When the U.S.S. Enterprise receives a top-priority order to protect a shipment of quadrotriticale grain on Deep Space Station K-7, Kirk is irritated to be guarding a shipment of "wheat." But the shipment is meant for famine-struck Sherman's Planet, and Klingons are taking shore leave on the space station. Adding to Kirk's irritation is Federation Undersecretary for Agriculture, Nilz Baris, and his pesty assistant, Arne Darvin, who inform Kirk that Starfleet Command is afraid the Klingons may try to steal the grain.
Another problem arises when a space trader, Cyrano Jones, gives Uhura a purring ball of fluff known as a tribble. Charmed by the creature, Uhura takes it back to the Enterprise. However, as McCoy soon learns, tribbles are born pregnant and the more they eat ... and they eat constantly ... the more they multiply. Soon the starship is overrun by the furry creatures.
Kirk soon finds that the bins that were once full of the precious quadrotriticale are now full of dead tribbles. The grain has been poisoned by a Klingon agent disguised as the Undersecretary's assistant, Darvin. His true identity is exposed when Kirk discovers that tribbles don't like Klingons (and vice-versa) and squeak whenever they're in near proximity. The Klingons leave the space station and Scotty rids the Enterprise of the tribbles by beaming them aboard the departing Klingon ship where, as he tells Kirk, " ... they'll be no tribble at all."