Julian Bashir and Miles O'Brien enjoy an evening at Vic's in the holosuite until the program suddenly changes into a noisy cabaret and Frankie Eyes, Vic's longtime rival, shows up to throw Vic out. Bashir and O'Brien try to delete Frankie or freeze the program but it doesn't work.
After Frankie fires Vic, the crew learns that Frankie was written into the holosuite program by Vic's designer, Felix. Upset by Frankie's treatment of Vic, and by the knowledge that the lounge's atmosphere will now change, the crew decides it must rid the program of Frankie. But to accomplish this task, they realize, he must be eliminated in a way that is period-specific to Fontaine's era: circa 1962. They can't just rewrite the program because that would result in Vic forgetting all the experiences that he has shared with the crew up to this point. The task takes on greater urgency when Vic is beaten up.
Vic reveals that he was assaulted by Frankie's bodyguard, Tony Cicci. Eager to discover Frankie's weak spot, Odo and Kira go undercover in the casino to do some research. Frankie takes a liking to Kira, and while the two flirt, Odo learns that Frankie works for crime boss Carl Zeemo, who expects to receive from Frankie a large skim of the hotel's huge daily profits. The crew hatches a plan to rob the casino (Ocean's Eleven style of the Bellagio heist), hoping it will cause Zeemo to "bump off" Frankie in retaliation.
The plot is set in motion when the crew infiltrates the casino staff, and Vic convinces Frankie to let him bring his high rolling contacts into the casino - who, unbeknownst to Frankie, are Starfleet officers. Meanwhile, Benjamin Sisko resents Kasidy's participation in the plan, admitting he hasn't visited Vic's because of how blacks were treated in Las Vegas in the 1960s. She urges him to reconsider, citing as reason the comfort she and Jake have both felt in the lounge, and soon Sisko agrees to play a pivotal role as a big-money gambler.
Vic walks the crew through their complex plan, to be executed the following night while Zeemo is in town, and which allows them only eight minutes to pull off the heist. Though all crew members are well-prepared for their roles, the actual evening presents several glitches to the plan - most notably when Nog discovers that the lock on the safe is of a different make than expected. While he struggles to crack the lock, Zeemo arrives early to pick up his cash.
Noticing Zeemo's premature entrance, Vic does his best to stall him, while the other crew members fabricate enough stories and distractions to allow a successful Nog and Odo to slip away with the cash. After Zeemo discovers an empty safe, his thugs lead Frankie and Cicci out of the casino while reaching for the guns under their lapels - leaving Vic to his cherished role as lounge singer and the crew to theirs as satisfied patrons. The atmosphere of the lounge changes back to the way it was originally, Vic takes the stage with his own band back, and calls Captain Sisko up, who joins him in a duet of "The Best is Yet to Come".