In the final days of the Italian Campaign of World War II, Hana, a French-Canadian nurse working and living in a bombed Italian monastery, looks after a critically burned man who speaks English but cannot remember his name. They are joined by Kip, a Sikh sapper in the British Army who defuses bombs and has a love affair with Hana before leaving, and David Caravaggio, a Canadian Intelligence Corps operative who was questioned by Germans and has had his thumbs cut off during a German interrogation. He questions the patient, who gradually reveals his past.
The patient tells Hana and Caravaggio that in the late 1930s he was exploring the desert of Libya. He is revealed to be Hungarian cartographer Count László de Almásy, who was mapping the Sahara as part of a Royal Geographical Society archeological and surveying expedition in Egypt and Libya with Englishman Peter Madox and others. Their expedition is joined by a British couple, Geoffrey and Katherine Clifton. Katherine and Almásy have an affair, which she abruptly ends. The explorers find and document the Cave of Swimmers and the surrounding area until they are stopped due to the onset of the war. Madox leaves his Tiger Moth at Kufra oasis before returning to England.
While Almásy is packing up their base camp, Clifton, in attempted murder-suicide, deliberately crashes his plane, narrowly missing Almásy. Clifton is killed instantly, Katherine is seriously injured. Almásy carries her to the cave, leaving her with provisions, and begins a three-day walk to get help. At British-held El Tag he attempts to explain the situation, but is detained as a possible German spy and transported on a train. He escapes the train and trades the Geographical Society maps to the Germans for gasoline. He finds Madox's Tiger Moth and flies back to the cave, but Katherine has died. As he flies himself and Katherine's body away, they are shot down by German anti-aircraft guns. Her body is not recovered; he is badly burned but is rescued by Bedouin.
After he has related the story he asks Hana for a lethal dose of morphine; she complies, and reads Katherine's final journal entries to him as he dies. She and Caravaggio leave the monastery for Florence.