Will Stockdale (Andy Griffith) is a backward, backwoods rube from outside Callville, Georgia who may or may not be smarter than he looks. Accused by Mr. McKinney (Dub Taylor) the head of the draft board of being a draft dodger, it turns out that Stockdale's draft notices have been hidden from him by his father, who doesn't want the boy to leave home and be ridiculed. His father tells Will to be careful going to big cities like Macon and Atlanta. Pa Stockdale says he has been to those cities many years before and he was ridiculed.
In 1959, United States Navy Rear Admiral Matt Sherman (Cary Grant), ComSubPac, boards the obsolete submarine USS Sea Tiger prior to her departure for the scrapyard. The first commanding officer of the Sea Tiger, Sherman begins reading his wartime personal logbook and recalling earlier events
Lieutenant (j.g.) Max Siegel and other US Navy personnel are stuck in a public relations unit far from the fighting. Lieutenant Commander Clinton T. Nash, their commanding officer and a stockbroker in civilian life, refuses to allow anyone to transfer out. Much of Siegel's time is spent showing war correspondents (like obnoxious Gordon Ripwell) and visiting Congressmen around the island.
The film is essentially a two-part program. The first half consists of a romantic comedy storyline involving an aerialist, played by Gene Kelly, who is drafted into the US Army but really wants to join the air force. During training, he falls in love with Kathryn (played by Kathryn Grayson), the daughter of his commanding officer, who has similarly put her singing career on hold in order to serve by providing entertainment for the troops. Unusually for this type of a film (and for this era of Hollywood), the character Kathryn has only recently met her father for the first time since she was a baby, her parents having divorced. A related subplot has Kathryn conniving to get her parents (played by John Boles and Mary Astor) to reconcile. During the first part of the film, Grayson sings several numbers and Kelly performs one of his most famous routines, dancing with a mop as a partner.
During a thunderstorm in early September 1944, units of the 35th Infantry Division are nearing the town of Nancy, France. One of the division's mechanized reconnaissance platoons receives orders to hold their position while under counterattack from the Germans; the out-numbered platoon are also on the receiving end of mortar fire from their own side.
The movie opens in the Caribbean, on the Island of San Moreno, where a trio of important looking men (a Chinese militant, a Russian General, and a European businessman) are meeting with the island's governor. After paying him a suitcase full of money for a special operation, the three men are joined, via helicopter, by Major Vladakov (Tim Curry), the second best terrorist in the world, who will be in charge of the operation. This entire event is witnessed by a young boy named Roberto who takes pictures of the governor, the Major, and his men.
After meeting in the Navy recruiting line, Al Crowthers (Dean Martin) and Melvin Jones (Jerry Lewis) become friends. Al has tried to enlist before, 11 times, but was always rejected because of a bad knee. However, he keeps trying so that he can impress women (including Betty Hutton in a cameo role as "Hetty Button"). Melvin, meanwhile, is allergic to women's cosmetics and his doctor prescribed ocean travel, so he decided to join the Navy as this was the only way he could afford to follow doctor's orders.
U.S. Army Specialist 5 (SP5) Tulsa McLean (Elvis Presley) is a tank crewman with a singing career. Serving with the 3rd Armored "Spearhead" Division in West Germany, McLean dreams of running his own nightclub when he leaves the army, but such dreams don't come cheap. Tulsa and his buddies have formed a band and perform in various German "Gasthauses", night clubs, and on an Armed Forces stage. In one bar, he even discovers the record "Blue Suede Shoes" sung by someone named Elvis Presley on a jukebox.
In 1944, Captain Josiah Newman (Peck) is head of the neuro-psychiatric Ward 7 at the Colfax Army Air Field military hospital, located in the Arizona desert. As he explains to a visiting VIP who wanders in: "We're short of beds, doctors, orderlies, nurses, everything ... except patients." He will use unconventional tactics to treat his patients and to recruit much needed personnel, as when he hijacks a new and very reluctant orderly, Corporal Jackson Leibowitz (Curtis), a wheeler-dealer from New Jersey. Leibowitz promptly has the entire ward participating in a sing-along of "Old MacDonald Had a Farm.
In post-World War II Germany, French Army Captain Henri Rochard (Cary Grant) is given the task of recruiting a highly skilled lens maker, Schindler (Martin Miller). He is assigned American Lieutenant Catherine Gates (Ann Sheridan) as his chauffeur, much to their mutual discomfort (arising from several prior clashes). The only available transportation is a motorcycle, which due to Army regulations, only Catherine is allowed to drive; Henri has to ride in the sidecar. After several mishaps, the constantly quarreling couple arrive at their destination, Bad Nauheim.
Chick Allen (Dean Martin) is a paratrooper. He invites his former partner, Hap Smith (Jerry Lewis), to help out with a show that he and the other soldiers are preparing. However, the general is unhappy with the quality of past shows and is threatening to eliminate them unless the quality improves, which is why Chick has invited Hap to help.
Slicker Smith and Herbie Brown (Abbott and Costello) are sidewalk peddlers who hawk neckties out of a suitcase. They are chased by a cop and duck into a movie theater, not realizing that it is now being used as an Army Recruitment Center. Believing that they are signing up for theater prizes, they end up enlisting instead.
Lieutenant Commander Charlie Madison (James Garner), United States Naval Reserve, is a cynical and highly efficient adjutant to Rear Admiral William Jessup (Melvyn Douglas) in 1944 London. Madison's job as a dog robber is to keep his boss and other high-ranking officers supplied with luxury goods and amiable Englishwomen. He falls in love with a driver from the motor pool, Emily Barham (Julie Andrews), who has lost her husband, brother, and father in the war. Madison's pleasure-seeking "American" lifestyle amid wartime rationing both fascinates and disgusts Emily, but she does not want to lose another loved one to war and finds the "practicing coward" Madison irresistible.
Private Meredith Bixby (Lewis) simply cannot fall in line with army procedure, even though he has had 17 months of training. A psychologist (Phyllis Kirk), is assigned to turn him into a good soldier, so she enlists two fellow servicemen to help Bixby with his training. About the only thing that he can do right is remember things with his photographic memory.
Following World War II, an entire destroyer escort, the U.S.S. Kornblatt, has mysteriously gone missing. Lieutenant John Paul Steckler VII (Jerry Lewis), the last of a long line of good-natured but goofing-up US Navy officers, was tasked with guiding the Kornblatt to its decommission, but somehow the ship disappeared on its home journey without a trace. Now, with a $4 billion appropriation at stake, Congressman Mandeville (Gale Gordon) refuses to approve the funds until the Kornblatt is recovered; and Steckler's former superior, Vice Admiral Bludde (Robert Middleton), who has been trying to sugarcoat this embarrassing incidence, has no other choice but to comply.