In 1979, during the Iranian Revolution, Islamic militants take over the U.S. embassy in Tehran in retaliation for the country's support of the recently deposed Shah. Although most of the embassy staff are taken as hostages, six evade capture and hide in the home of Canadian ambassador Ken Taylor (Victor Garber). With the escapees' situation kept secret, the State Department begins to explore options for "exfiltrating" them from Iran. CIA specialist Tony Mendez (Ben Affleck), brought in for consultation, points out the fundamental weaknesses in all of the proposals for how to do so, but is at a loss to suggest an alternative until he gets an idea while watching the science-fiction movie Battle for the Planet of the Apes on TV with his son: create a cover story that the escapees are Canadian filmmakers, scouting "exotic" locations in Iran for a similar film.
Mendez and his supervisor Jack O'Donnell (Bryan Cranston) contact John Chambers (John Goodman), a Hollywood make-up artist who has previously crafted disguises for the CIA in addition to his work in the Apes film series. Chambers puts them in touch with Lester Siegel (Alan Arkin), a modestly successful film producer. Together they set up a phoney film studio and successfully establish the pretense of developing Argo a "science fantasy" in the style of the recent hit Star Wars, to lend credibility to the cover story. Meanwhile, the situation in Tehran is getting more strained. The hostage crisis is dragging into months, and the escapees are growing frantic confined to the ambassador's residence. Shredded documentation from the US embassy is being reassembled, providing the revolutionaries with evidence that there are embassy personnel unaccounted for, and their identities.
Mendez enters Iran through standard channels under an alias, acquiring documentation of his visit as a producer for Argo. He goes to the ambassador's home and explains his plan to the six escapees, providing them with fake Canadian passports and extensive information about their fake identities to help them convincingly bluff their way through security at the airport. Although they are afraid to trust Mendez's scheme, they reluctantly agree to go along with it, knowing that Mendez is risking his own life too, and convinced that it is their only option. A "scouting" visit to the bazaar to maintain their cover story goes somewhat poorly, but Mendez manages to extricate them from the suspicious crowd.
Mendez is informed that the operation has been cancelled, to avoid conflicting with a planned military rescue of the hostages. But the next day he unilaterally proceeds as planned, forcing O'Donnell to hastily demand of his superiors to reactivate logistical support. At the airport there is tension as the escapees' commercial flight reservations are only confirmed at the last minute, a call to the supposed studio in Hollywood at first goes unanswered, and revolutionaries who have uncovered their ruse rush to stop them. But they successfully board the plane, which takes off with revolutionary forces in close pursuit.
To protect the hostages remaining in Tehran from further retaliation, all US involvement in the caper is suppressed, giving full credit to the Canadian government and its ambassador (who fled Iran with his wife under their own credentials as the operation was underway). Mendez is awarded the Intelligence Star, but is unable to keep the medal itself because of the classified nature of the work he did to earn it. In the epilogue, it is explained that the medal was returned to him when the operation was declassified in 1997, and that, after 444 days, all the remaining hostages were freed on January 20, 1981. The film ends with Jimmy Carter giving a speech about the Crisis and the Canadian Caper, with screenshots from the film being contrasted with images of the actual people and events during the crisis.
(The "Canadian Caper" was the popular name given to the joint covert rescue by the Government of Canada and the United States Central Intelligence Agency of six American diplomats who evaded capture during the seizure of the United States embassy in Tehran, Iran and taking of embassy personnel as hostages by the Iranians on November 4, 1979.)