Samuel Sayer (Robert Morley) and his sister Rose (Katharine Hepburn) are British Methodist missionaries in the village of Kungdu in German East Africa at the beginning of World War I in August/September 1914. Their mail and supplies are delivered by a small tramp steamer named the African Queen, helmed by the rough-and-ready Canadian boat captain Charlie Allnut (Humphrey Bogart), whose coarse behavior they tolerate in a rather stiff manner.
When Charlie warns them that war has broken out between Germany and Britain, the Sayers choose to stay on, only to witness the Germans burning down the mission village and herding the villagers away. When Samuel protests, he is beaten by a German soldier. After the Germans leave, Samuel becomes delirious with fever and soon dies. Charlie returns shortly afterward. He helps Rose bury her brother, and they set off in the African Queen.
In discussing their situation, Charlie mentions to Rose that the Germans have a gunboat, the Königin Luise (German for “Queen Louisa“), which patrols a large lake downriver, effectively blocking any British counter-attacks. Rose comes up with a plan to convert the African Queen into a torpedo boat, and sink the Königin Luise. Charlie points out that navigating the Ulanga River to get to the lake would be suicidal: to reach the lake they would have to pass a German fort and negotiate several dangerous rapids. But Rose is insistent and eventually persuades him to go along with the plan.
Charlie hoped after passing the first obstacle that Rose would be discouraged, but she is confident they can handle what is yet to come, and argues that Charlie promised to go all the way. During their journey down the river, Charlie, Rose and the African Queen encounter many obstacles, including the German fort and three sets of rapids. The first set of rapids is rather easy; they get through with minimal flooding in the boat. But Rose and Charlie have to duck down when they pass the fortress and the soldiers begin shooting at them, blowing two bullet holes in the top of the boiler and causing one of the steam pressure hoses to disconnect from the boiler, which in turn, causes the boat’s engine to stop running. Luckily, Charlie manages to reattach the hose to the boiler just as they are about to enter the second set of rapids. The boat rolls and pitches crazily as it goes down the rapids, leading to more severe flooding in the boat and also collapsing the stern canopy.
While celebrating their success, the two find themselves in an embrace. Embarrassed, they break off, but eventually succumb and strike up a relationship. The couple decide to take a pit stop to gather more fuel and drain the boat. Back on the river, Charlie and Rose watch hippopotamuses and chimpanzees frolic on the nearby river bank when the third set of rapids comes up. This time, there is a loud metallic clattering noise as the boat goes over the falls. Once again, the couple dock on the river bank to check for damage. When Charlie dives under the boat, he finds the propeller shaft bent sideways and a blade missing from the propeller. Luckily, with some expert skills and using suggestions from Rose, Charlie manages to straighten the shaft and weld a new blade on to the propeller, and they are off again.
All appears lost when Charlie and Rose “lose the channel” and the boat becomes mired in the mud amid dense reeds near the mouth of the river. First, they try to tow the boat through the muck, only to have Charlie come out of the water covered with leeches. All their efforts to free the African Queen fail. With no supplies left and short of potable water, Rose and a feverish Charlie turn in, convinced they have no hope of survival. Before going to sleep Rose prays that she and Charlie be admitted into Heaven. As they sleep, exhausted and beaten, heavy rains raise the river’s level and float the African Queen off of the mud and into the lake which, it turns out, is just a short distance from their location. Once on the lake, they narrowly avoid being spotted by the Königin Luise. The Königin Luise anchors nearby, then departs, but Charlie believes that she will return in two days and anchor there again as the she makes her normal rounds of the lake.
Over the next two days, Charlie and Rose convert some oxygen cylinders into torpedoes using gelatin explosives and improvised detonators that use nails as the firing pins for rifle cartridges. They then push the torpedoes through holes in the bow of the African Queen for use as improvised spar torpedoes. The Königin Luise returns and anchors as Charlie predicted, and Charlie and Rose steam the African Queen out onto the lake in darkness, intending to set her on a collision course with the Königin Luise before diving overboard, swimming to the east shore of the lake, and then making their way to safety in Kenya. A strong storm strikes as they head toward the Königin Luise. Unfortunately, the holes in the bow through which they pushed the torpedoes are not sealed, allowing water to pour into the African Queen, causing her to sink lower and lower. Eventually the African Queen capsizes, throwing them both into the water. Charlie loses sight of Rose in the storm.
Charlie is captured and taken aboard the Königin Luise, where he is questioned by the captain. Believing Rose to have drowned, he makes no attempt to defend himself against accusations of spying, and the German captain sentences him to death by hanging. However, Rose is captured and brought to the Königin Luise just after Charlie’s sentence is handed down. Charlie hollers her name, then tries to protect her by pretending not to know her. The captain questions her, and Rose confesses the whole plot proudly, deciding they have nothing to lose anyway. The captain sentences her to be executed as a spy, too. Charlie asks the German captain to marry them before executing them. After a brief marriage ceremony, the Germans prepare to hang them, but there is a sudden explosion and the Königin Luise quickly capsizes and sinks. The Königin Luise has struck the overturned hull of the African Queen and detonated the torpedoes. Rose’s plan has worked after all, if a little belatedly, and the newly married couple happily swims to safety on the east shore of the lake.