In 1984 East Germany, Stasi Hauptmann Gerd Wiesler (Ulrich Mühe), code name HGW XX/7, is ordered to spy on the playwright Georg Dreyman (Sebastian Koch), who has escaped state scrutiny due to his pro-Communist views and international recognition. Wiesler and his team bug the apartment, set up surveillance equipment in an attic, and begin reporting Dreyman’s activities. Wiesler learns that Dreyman has been put under surveillance at the request of the Minister of Culture, Bruno Hempf (Thomas Thieme), who covets Dreyman’s girlfriend, actress Christa-Maria Sieland (Martina Gedeck). After an intervention by Wiesler leads to Dreyman’s discovering Sieland’s relationship with Hempf, he implores her not to meet him again. Sieland flees to a nearby bar where Wiesler, posing as a fan, urges her to be true to herself. She returns home and reconciles with Dreyman.
At Dreyman’s birthday party, his friend Albert Jerska (a blacklisted theatrical director) gives him sheet music for Sonate vom Guten Menschen (Sonata for a Good Man). Shortly afterwards, Jerska hangs himself. Dreyman decides to publish an anonymous article in Der Spiegel, a prominent West German newsweekly. Dreyman’s article accuses the state of concealing the country’s elevated suicide rates. Since all East German typewriters are registered and identifiable, an editor of Der Spiegel smuggles Dreyman a miniature typewriter with a red ribbon. Dreyman hides the typewriter under a floorboard of his apartment but is seen by Sieland. When Dreyman and his friends feign a defection attempt to determine whether or not his flat is bugged, Wiesler does not alert the border guards or his superior Lt. Col. Anton Grubitz (Ulrich Tukur) and the conspirators believe they are safe.
Dreyman’s article is published, angering the East German authorities. The Stasi obtains a copy, but are unable to link it to any registered typewriter. Livid at being rejected by Sieland, Hempf orders Grubitz to arrest her. She is blackmailed into revealing Dreyman’s authorship of the article, although when the Stasi search his apartment, they cannot find the typewriter. Grubitz, suspicious that Wiesler has mentioned nothing unusual in his daily reports of the monitoring, orders him to do the follow-up interrogation of Sieland. Wiesler forces Sieland to tell him where the typewriter is hidden.
Grubitz and the Stasi return to Dreyman’s apartment. Sieland realizes that Dreyman will know she betrayed him and flees the apartment. When Grubitz removes the floor, the typewriter is gone—Wiesler having removed it before the search team arrived. Unaware of this, Sieland runs to the street and commits suicide by stepping into the path of a truck. Grubitz informs Wiesler that the investigation is over and so is Wiesler’s career: His remaining 20 years with the agency will be in Department M, a dead-end position for disgraced agents.
On 9 November 1989, Wiesler is steam-opening letters when a co-worker tells him about the fall of the Berlin Wall. Wiesler silently gets up and leaves the office, inspiring his co-workers to do the same. Two years later, Hempf and Dreyman meet while attending a performance of Dreyman’s play. Dreyman asks the former minister why he had never been monitored. Hempf tells him that he had been under full surveillance in 1984. Dreyman searches his apartment and finds the listening devices.
At the Stasi Records Agency, Dreyman reviews the files kept while he was under surveillance. He reads that Sieland was released just before the second search and could not have removed the typewriter. He reaches the final report and sees a fingerprint in red ink and realizes that the officer in charge of his surveillance – Stasi officer HGW XX/7 – had concealed his illegal activities, including his authorship of the suicide article, and also removed the typewriter from his apartment. Dreyman tracks down Wiesler, who now works as a postman, but decides not to approach him.
Two years later, Wiesler passes a bookstore window display promoting Dreyman’s new novel, Sonate vom Guten Menschen. He goes inside and opens a copy of the book, discovering it is dedicated “To HGW XX/7, in gratitude”. Deeply moved, Wiesler buys the book. When the cashier asks if he would like the book gift-wrapped, Wiesler replies, “No, it’s for me.”