Homer, Lenny and Carl all want a doughnut, but only one is left and Homer grossly drools all over it. Homer then thinks up a solution: he places the donut in the reactor core in an attempt to make it huge enough for them to all have enough to eat. Within ten minutes, the power plant is on fire and Homer is fired (after pretending it was his first day which Mr. Burns initially fell for, until Smithers pointed out he'd worked at SNPP for 10 years). While lying on the couch at home, Homer sees a recruitment ad on TV for the Naval Reserve and decides to make a difference and enlist. Moe, Barney, and Apu also decide to join him: Barney wants to look out for his best friend's safety, Moe wants to ensure his two best customers remain alive and well, and Apu is opposed by religion to any form of war but says "what the heck". Meanwhile, Bart is impressed when Milhouse gets an earring, and all the students (including the bullies) find it very cool. Bart then buys himself an earring as well, much to Homer's outrage. He then hopes to woo everyone with it, but later finds out that every student has bought himself/herself an earring, except for Lisa (who is forbidden by Homer to get her ears pierced earlier).
Homer and the others attend boot camp and soon graduate. They are later forced to participate in the annual war games and are placed on board a nuclear submarine the SSBN U.S.S. Jebediah which is under the command of Captain Tenille. Homer says goodbye to his family, and Bart and Homer argue about the earring. Bart bitterly removes the earring and gives it to Homer, who then boards the submarine. Captain Tenille takes a shine to Homer and when the Captain goes to check on a problem in the torpedo hatch, Homer is left in charge. At this point, an enemy submarine approaches Homer's, and Homer immediately responds by giving the order to fire a torpedo. However, Captain Tenille is in the torpedo tube and is fired at the other submarine. The other sub fires back at them, and Homer gives the order to retreat. The submarine ends up in Russian waters and is seen by the United States government as an attempt to defect. This event creates a political schism between the USA and Russia, leading to the revelation that the Soviet Union in fact never truly dissolved. Nuclear war is anticipated until the US Navy drops depth charges on Homer's sub, aiming either to destroy it or force it to surface. The consequent explosion causes a pinhole leak in the submarine's wall. The crew all believe their situation is fatal until Homer remembers the earring he took from Bart. He uses it to plug the leak and saves the submarine.
The vessel surfaces and Homer is taken to be court-martialed. Because the officers on the review committee have done such awful things as accidentally sink a cruise ship, accept bribes from defense contractors, and refuse to stop impersonating Hillary Clinton, Homer's punishment ends up being a mild dishonorable discharge and he immediately forgives Bart, as the earring saved his life.