The planet Sigma Iotia II's last visit by the Federation was by the U.S.S. Horizon ... a hundred years before. Realizing the lapse in monitoring the planet, the Federation sends the U.S.S. Enterprise to observe the progress of Iotia's population.
Beaming down to the planet's surface, Kirk, Spock and McCoy are surprised to see a much different society — an Earth-like 1920s gangster culture — than was reported by the U.S.S. Horizon crew. Bodily seized, the landing crew are taken before one of the major planetary leaders, mobster Bela Oxmyx. Wishing to unite the population under his rule, Bela offers Kirk "a piece of the action" in exchange for the technologically advanced weapons of the U.S.S. Enterprise.
Meanwhile, the other lead gangster, Jojo Krako, has his own idea about being the head mobster and captures the Enterprise officers. Struggling to gain the upper hand in this comical power struggle, Kirk creates a diversion ... a little card game known as fizzbin. Without knowing the nuances of the culture, Kirk and Spock try to accomplish their mission when Kirk attempts to drive a car and Spock strives to speak in gangster slang.
Finally, Bela Oxmyx is given a display of the Federation's power when he is beamed aboard the Enterprise and held hostage in the transporter room. Arranging a meeting between the two antagonists, Kirk is successful in uniting the two gangs in a loose system of government with the Federation as Godfather ... for a piece of the action, of course. Furthermore, upon discovering a book — "Chicago Mobs of the Twenties" — the U.S.S. Horizon crew left behind 100 years before, Kirk and Spock finally understand how the highly imitative Iotians reinvented their entire society.
Back aboard the U.S.S. Enterprise, Kirk notices McCoy unusually drawn and worried. When questioned, McCoy is forced to admit that he thinks he left his communicator on Sigma Iotia II, leaving him to wonder what type of planetary society the next Federation visit will find ...