The Spy Who Came In From The Cold opens with the death of Karl Riemeck, shot whilst attempting to cross from East to West Berlin in the early 1960s. Riemeck was the last surviving agent of British Intelligence's Berlin station, run by Alec Leamas. 

Leamas is recalled to headquarters in London where the spymaster Control asks him to carry out one last, vitally important mission: to infiltrate East Germany’s Intelligence service with the aim of discrediting and effecting the removal of its chief, Hans Dieter Mundt. After that he can retire: he can ‘come in from the cold’.  Leamas is disillusioned and burnt out, but he agrees.  The mission requires that he appear to go off the rails, making himself ripe for recruitment by the enemy.  He takes a lowly job in a library in Bayswater. There he meets Liz Gold, a member of the Communist Party, with whom he develops a relationship.  When it is time for him to leave he tells her not to search for him, whatever happens.  He then assaults a local grocer and is sent to prison for a few months – his cover story, or legend, is coming together.

On leaving prison, Leamas lets himself be recruited by East German agents and is taken to Holland, where he is paid to reveal what he knows of British Intelligence.  Stories of Leamas breaching the Official Secrets Act are leaked to the press, making it impossible for him to return home.   He appears to have no choice but to let his new masters take him to East Germany.  

Leamas is interrogated by Fiedler, Mundt's deputy, who already has suspicions about his superior’s loyalty; he wants to use Leamas to expose Mundt as a traitor.  Liz Gold, meanwhile, is invited as Secretary of her branch of the Communist Party to attend a conference in East Germany.

Based on Leamas's evidence, Fiedler issues a warrant for Mundt's arrest.  The spymaster is put on trial, with Fiedler prosecuting and Leamas attending as a captive witness.  It looks for a time as if he will be successful in painting Mundt as a British agent, so disrupting the core of East German Intelligence.

Then Mundt produces Liz Gold as a witness, and successfully discredits Leamas’s testimony, revealing him still to be a British Intelligence officer. Fiedler is arrested.  Leamas realises at last that the whole complex operation has been planned by Control: Mundt really is a British agent, and the theatre of the sabotaged tribunal was intended to strengthen his position. 

Mundt arranges for Liz and Leamas to escape and provides a car to take them to Berlin. He gives Leamas precise instructions on how and where to cross the Wall into West Berlin. As instructed, Leamas climbs up first.  Once on top of the Wall he reaches down for Liz but, as he does so, a spotlight finds her and she is shot by East German border guards.   Instead of opting for the westen side and safety, Leamas jumps back into the East and is shot dead.