At the Burpelson U.S. Air Force Base somewhere in the continental USA, the eccentric Brigadier General Jack D. Ripper (Sterling Hayden) orders the 34 nuclear-armed B-52's of the 843rd Bomb Wing past their failsafe points where they normally hold awaiting possible orders to proceed and into Soviet airspace. He also tells the personnel on the base that the US and the USSR have entered into a "shooting war".
In the "War Room" at The Pentagon, Air Force General Buck Turgidson (George C. Scott) briefs President Merkin Muffley (Peter Sellers) about the attack that General Ripper ordered. Although a nuclear attack should require Presidential authority to be initiated, Ripper used "Plan R", an emergency war plan enabling a senior officer to launch a retaliation strike against the Soviets if everyone in the normal chain of command, including the President, has been killed during a sneak attack. Plan R was intended to discourage the Soviets from launching a decapitation strike against the President in Washington to disrupt U.S. command and control and stop an American nuclear counterattack. Turgidson tries to convince Muffley to take advantage of the situation to eliminate the Soviets as a threat by launching a full-scale attack. Turgidson believes that the United States is in a superior strategic position, and a first strike against the Soviet Union would destroy 90% of their missiles before they could retaliate, resulting in a victory for the U.S. with "acceptable" American casualties of "no more than 10 to 20 million killed, tops... depending on the breaks". He is rebuked when Muffley instead admits the Soviet Ambassador (Peter Bull) to the War Room, contacts Soviet Premier Dmitri Kissoff on the hotline, and insists on giving the Soviets all the information necessary to shoot down the American planes before they can carry out their strikes.
Group Captain Lionel Mandrake (also played by Peter Sellers), an RAF exchange officer serving as General Ripper's executive officer, realizes that there has been no attack on the U.S. when he turns on a radio and hears pop music instead of Civil Defense alerts. When Mandrake reveals this to Ripper, and Ripper refuses to recall the wing, Mandrake announces that he will issue the recall on his own authority, but only Ripper knows the three-letter code necessary for recalling the bombers and locks the two of them in his office. Mandrake tries to convince Ripper to give up the three letter code. The psychotic Ripper refuses and rambles on that the Communists have a plan to "sap and impurify" the "precious bodily fluids" of the American people with fluoridated water, a theory that occurred to him during sexual intercourse, and which he believed to be the cause of his post-coital fatigue.
Over the phone, an unseen and drunken Kissoff reveals to the Soviet Ambassador that their country has installed an active "Doomsday Device" which will automatically destroy all life on Earth if a nuclear attack were to hit the Soviet Union. The Doomsday Device is operated by a network of computers and has been conceived as the ultimate deterrent: as a safeguard, it cannot be deactivated, or it will set itself off, because its hardware and programs have been configured in such a way that an attempt at its deactivation would be recognized as sabotage. The doomsday weapon is described as based on "cobalt-thorium-G" [this was inspired by the real idea of a cobalt bomb, conceived by nuclear pioneer Leo Szilard, founder of Council for a Livable World]. According to the Soviet ambassador, life on Earth's surface will be extinct in ten months and was made as a low cost alternative to the bomb-race.
The President now calls upon Dr. Strangelove (a.k.a. Merkwürdigeliebe), a former Nazi and strategy expert (Sellers in his third role). The wheelchair-bound Strangelove is a type of "mad scientist", whose eccentricities include a severe case of alien hand syndrome, so that his right hand, clad in an ominous black leather glove, occasionally attempts to strangle Strangelove or make the Nazi salute (no one in the room acts if this is unsusual). Strangelove also slips in addressing the President, as either "Mein President" or even "Mein Führer".
Strangelove explains the principles behind the Doomsday Device, which he says is "simple to understand... credible and convincing". He also points out that a Doomsday Device kept secret has no value as a deterrent; the Soviet Ambassador admits that his government had installed it a few days before they were going to announce it publicly to the world, because Kissoff "loves surprises".
U.S. Army paratroopers sent by the President arrive at Burpelson to arrest General Ripper. Because Ripper has warned his men that the enemy might attack disguised as American soldiers, the base's security forces, and Ripper himself with a .50 caliber M1919 Browning machine gun kept in his golf bag, open fire on them. After a fierce firefight the Army forces win the battle and gain access to the base, and Ripper, fearing torture to extract the recall code commits suicide. Colonel "Bat" Guano (Keenan Wynn) shoots his way into Ripper's office, but suspects that Mandrake, whose uniform he does not recognize, is leading a mutiny of "deviated preverts" and proceeds to arrest him. Mandrake convinces Guano that he has to call the President to tell him the recall code, which he has deduced from Ripper's desk blotter doodles to be based on the initials for the phrases peace on earth and purity of essence. Since office phone connections had been knocked out by the fighting at the base, Mandrake is forced to use a pay phone to try to contact the President. Not having the correct change to place a long-distance call to the Pentagon, Mandrake persuades Guano to shoot a Coca-Cola vending machine to get the change out of it, and eventually is able to forward the likely code combinations to Strategic Air Command.
The correct recall code, "OPE", is issued to the planes, and those that have not been shot down return to base except for one. Its radio and fuel tanks were damaged by a Soviet anti-aircraft missile, with the result that the plane is neither able to receive the recall code nor to reach its primary or secondary target where, at the urging of the U.S. President, the Soviets have concentrated all available defenses. On the crew's own initiative, and losing fuel, the plane proceeds to fly at low level under radar to a closer target of opportunity.
As they start their bomb run, the damaged B-52's bomb bay doors will not open, and aircraft commander Major T. J. "King" Kong (Slim Pickens) goes down to the bomb bay to open them himself. He succeeds just as the plane reaches its target, and one of the nuclear bombs falls, with Kong still sitting on it. He straddles the bomb and rides it to the ground like a rodeo cowboy, whooping and hollering and waving his cowboy hat. The bomb explodes, triggering the Doomsday Machine.
Back in the War Room, Dr. Strangelove recommends to the President that a select group of about 200,000 or more people be relocated into a deep mine shaft, where the nuclear fallout cannot reach them, so that the U.S. can be repopulated afterwards. Because of space limitations, Strangelove suggests a gender ratio of "ten females to each male", with the women selected for their sexual characteristics, and the men selected on the basis of their physical strength, intellectual capabilities, and importance in business and government. General Turgidson rants that the Soviets will likely create an even better bunker than the U.S., and argues that America "must not allow a mine shaft gap". Meanwhile, the Soviet Ambassador retreats to a corner of the War Room and starts taking pictures with a spy camera disguised as a pocket watch.
A visibly excited Dr. Strangelove bolts out of his wheelchair, shouting "Mein Führer, I can walk!". Abruptly, the film ends with a barrage of nuclear explosions, accompanied by Vera Lynn's famous World War II song "We'll Meet Again".