Planet Spaceball, led by the incompetent President Skroob, has wasted all of its air. Skroob schemes to force King Roland of the neighboring planet Druidia to give them their air by kidnapping his daughter Princess Vespa on the day of her pre-arranged wedding to the narcoleptic Prince Valium. Skroob sends the villainous Dark Helmet to complete this task with Spaceball One, an impossibly huge ship helmed by Colonel Sandurz. Before they can arrive, Vespa abandons her wedding and flees the planet in her Mercedes spaceship with her Droid of Honor, Dot Matrix.
Roland contacts mercenary Lone Starr and his mawg (half-man, half-dog) sidekick Barf, offering a lucrative reward to retrieve Vespa before she is captured. Lone Starr readily accepts, as he is in major debt with the gangster Pizza the Hutt. In their Winnebago space ship the Eagle 5, Starr and Barf are able to reach Vespa before Spaceball One, rescue both her and Dot, then escape. Spaceball One tries to follow, but Helmet foolishly orders the ship to "ludicrous speed," causing it to overshoot the escapees.
Out of fuel, Starr is forced to crash-land on the nearby "desert moon of Vega". The escapees travel on foot in blazing sun and pass out. They are found by The Dinks, a group of red-clad little people, and are taken to a cave occupied by Yogurt, who is old and wise. Yogurt introduces Starr to "The Schwartz", a metaphysical power similar to the Force. Yogurt also introduces the audience to the film's merchandising campaign. Starr and Vespa begin to flirt, but Vespa insists she can only be married to a prince.
Helmet and Sandurz break the fourth wall by using a VHS copy of the film to discover Vespa's location, and Helmet orders Spaceball One to the moon. The Spaceballs capture Vespa and Dot, and return with them to planet Spaceball. Their captors threaten to reverse Vespa's nose job, forcing Roland to give over the code to the shield that protects Druidia. Helmet takes Spaceball One to Druidia, where he transforms the ship into Mega Maid, a giant robotic maid with a vacuum cleaner that begins sucking the air from the planet. Starr and Barf rescue Vespa and Dot from captivity, and then race to Druidia. Starr is able to use the Schwartz to reverse the robot's sucking action, returning the air to the planet.
Starr and his allies enter the Mega Maid to attempt to destroy it. Starr is forced to fight Helmet with lightsaber-like "Schwartz rings" near the ship's self-destruct button. Starr manages to defeat Helmet, causing him to involuntarily strike the button. Starr and his friends escape the ship, while Skroob, Helmet, and Sandurz fail to reach any escape pods in time. Trapped in the robot's head as the ship explodes, they land on a nearby planet, much to the regret of its Planet of the Apes-like population.
With Starr's debt to Pizza nullified by the gangster's untimely death, he returns Vespa to Roland and leaves, taking only enough money to cover his expenses. After a lunch break at a diner and a strange incident involving an alien and an astronaut, Starr finds a final message from Yogurt informing him that he is a prince and thus eligible to marry Vespa. He manages to reach Druidia in time to stop her wedding to Valium, announces his royal lineage, then marries Vespa himself.
Who is forced to fight Helmet with lightsaber-like "Schwartz rings"?
Starr