The Secret Pilgrim is a 1990 episodic novel by British writer John le Carré, set within the frame narrative of an informal dinner talk given at the spy-training school in Sarratt by George Smiley. As Smiley talks, the first-person narrator, whom readers know only as "Ned", recalls his own experiences in a long career in the service. The various episodes are triggered by comments from Smiley, which send Ned into tangential memories. The individual stories together create a portrait of Ned himself, moving from the start of his career at the beginning of the novel to his retirement in the final chapter.

Plot Part one Smiley reflects on the end of the Cold War, and makes a rueful joke that, in one way, the world has changed, but in another, it has always been the same and the secret services are gradually waking up from their own deluded perceptions of it, and themselves.

After a couple of years of training at the Sarratt Nursery, in the glens of Argyll and battle camps of Wiltshire, Ned is looking forward to his first overseas posting and is disappointed to be kept in London, as part of a team of watchers keeping an eye on a Middle Eastern royal family. In a famous Knightsbridge store, Ned becomes alarmed when he sees a suspicious Arab closely following the prince's wife at a distance. Ned prepares to incapacitate him with a martial arts blow, but his supervisor Monty grabs Ned and holds him back. Ned learns that the wife is a compulsive shoplifter and the man is not a fanatic assassin, but instead assigned by the prince to pay compensation and hush money to the stores she steals from. Monty comments, "That's the trouble in our job, Ned. Life's looking one way, we're looking the other."

Part two Smiley informs Ned's students that no one on Earth is more adept at hiding his true feelings than the privately educated Englishman – "which is why some of our best officers turn out to be our worst, and our worst, our best, and why the most difficult agent you'll ever have to run is yourself."

Ned returns to his flat in humiliation after the episode in Knightsbridge, and finds Smiley and the Circus's head of Personnel going through his belongings. Smiley informs him that Ned's best friend from Sarratt, Benjamin Arno Cavendish, disappeared just after starting his assignment in Berlin, and the East German network he was supposed to be running has collapsed. In Ben's flat, the Circus found a love letter written to Ned. Ned is shocked, as he had no idea that Ben was homosexual, much less so passionately attached to him.

After Smiley leaves, Ned tracks down Ben, hiding with his German cousin, Stephanie, in the Western Isles of Scotland. Ben confesses that, beneath his confident, derring-do exterior, he is always terrified of failure, especially when he feels he has to live up to the example of his father, who had an illustrious career during the Second World War as a mathematician, devising the Double-Cross System. While in Berlin, Ben was constantly harassed and patronised by his immediate superior, Haggerty, who despised Ben for replacing him due to his clean reputation. Before his first meeting with the lead agent in East Germany, Ben wrote a crib sheet with the agents' names and contact procedures, and took it with him when he crossed into East Berlin. As it turned out, he didn't need it, and his meeting with the agent went perfectly, but after he crossed back into West Germany, he realised he'd lost the crib sheet somewhere. Unable to warn the network before it collapsed, Ben secretly fled Germany and sought shelter with Stephanie. It takes a moment for Ned to absorb the "appalling banality" of Ben's story; "that you could lose a network in the same way you might lose a set of keys or a pocket handkerchief."

Smiley has had Ned followed, and Circus agents arrive to take Ben in for questioning, shortly after he finishes his story. Ned later hears that he has been dismissed from the Circus.

Part three While one of Ned's students is quizzing Smiley about the 'secret' of conducting an interrogation, Smiley frowns and says that recognising the truth is far more difficult than spotting a lie. After all, spies are naturally suspicious people, and nothing is more suspicious to them than a completely innocent man who has nothing to hide.

After his unwitting exposure of his friend Benjamin Cavendish, Ned is posted to Hamburg in Western Germany to run a network of Baltic sailors, led by a passionate Latvian smuggler named Brandt. Though surprisingly efficient, Ned is wary of his position due to his predecessor's hushed up departure after embezzling massive amounts of Circus funds and settling to Southern Spain with his boyfriend.

In the course of their operations, Brandt reveals his new girlfriend, Bella, who is said to be the daughter of a friend of Brandt's. Head of London Station, Bill Haydon orders Ned to inquire about Bella's credentials due to the fact that her sudden appearance in the network's inner circle appears suspicious. Ned eventually seduces (or rather, is seduced by) Bella and they begin an affair during Brandt's absence.

Later, Brandt's men walk into a trap at the coast of Narva in Estonia and the crew are taken by the Soviets. Brandt is taken to Sarratt for interrogation while Ned is summoned to London for debriefing. He is interviewed by Haydon, who was accompanied by his lieutenants, Roy Bland and Toby Esterhase along with George Smiley. Ned is interrogated about Bella's background and her story about being the daughter of a German soldier who had raped her mother when her "father" was fighting in the Second World War.

Though Ned answers reasonably, Haydon counters him with a photograph, depicting Bella as a language student in a Moscow Centre linguistics school that trains prospective undercover agents. Haydon's coterie, barring Smiley, take the photograph as genuine, as its source is London Station's Witchcraft Project. Ultimately, it's decided that Bella must have been the mole and Ned is ordered to bring her in to be interrogated in Sarratt. Eventually, the inquiry stagnates and both Bella and Brandt are released to settle in Canada and to resume smuggling, respectively.

Brandt refuses to take Bella back for then-unknown reasons, which gives Ned the impression that Haydon informed Brandt of Bella's infidelity, out of mischief. In 1989, during a lunch with Toby Esterhase, Ned learns that Esterhase and Peter Guillam were in Moscow as a part of an intelligence delegation. During their guided tour in Moscow Centre headquarters, they run into a familiar figure who is none other than Captain Brandt. It was Brandt who had betrayed the previous network, as well as the new one.

Part four Ned reflects that every employee of the Circus of a certain generation can recall where he or she was at the time of "The Fall" – Bill Haydon's exposure as a KGB mole. Ned himself was in Rome, in the middle of a celebratory dinner after installing a wiretap against a Roman Catholic cardinal suspected of involvement with arms dealers, when he received the telex from London with the shocking news.

With Haydon's exposure, every Circus officer's identity must be considered compromised, and Ned is told that he cannot be posted anywhere outside of Western Bloc countries.

Part five Smiley muses that the most vulgar thing about the Cold War was that the Western societies learned to "gobble up [their] own propaganda." The West became so convinced of the righteousness of its own cause, and the evil of the Soviets', that it never stopped to examine the ethics of its actions. In the name of expediency, the Circus opened its arms – and its purse – to every petty thug and two-bit con man who called himself an anti-Communist.

Ned's first post-Haydon posting is to Munich, as the Circus's liaison with various Eastern Bloc exile communities, quietly discouraging their crackpot schemes to foment anarchy in the Soviet Union, or encouraging whatever legitimate intelligence sources they have in their home countries. According to Toby Esterhase, the "star" of the Circus's Munich arm is Professor Teodor, a fugitive Hungarian academic. At first, Ned is dazzled by Teodor's passionate lectures on the evils wreaked on Hungary by the Allied Powers after World War I, but finds his opinions shallow when the Professor is quizzed on more current events. Giving Teodor the benefit of the doubt, Ned corresponds to his associates in the American intelligence fraternity, only to learn that they had come to realise that Teodor's intelligence work is completely worthless. Ned begins to see that the Circus has good reason for denying Teodor's repeated requests to be issued a British passport.

In the middle of the night, Ned is called to Teodor's home and introduced to a Hungarian man named Latzi, who says he has been sent by the Hungarian secret service to assassinate Teodor, but has refused out of admiration for the Professor and wants to defect. Before long, Esterhase and the American CIA are lauding the two Hungarians for their courage and arranging for Teodor's honourable retirement from intelligence work, including issuing passports. Ned's protests that "the whole thing's a con" are ignored.

Aside, Teodor's long-suffering wife confesses that Latzi is a "bad actor" and an old friend of Teodor, whom Teodor used as a go-between when he wanted to inform on his students to the Hungarian authorities. When Ned vents his outrage to Smiley back in London, Smiley regards the incident as an amusing farce, initially only remarking, "Oh, Toby." As Smiley later explains, "all churches need their saints... and saints, when you get right down to it, are a pretty bogus lot." Later, Teodor and Latzi are the "stars" of a highly publicized book tour throughout the United States, detailing Teodor's courageous work against communism and his harrowing escape from death.

Part six After delighting Ned's students with a lighthearted story about how the Circus recruited a South American diplomat with a secret passion for British model trains, Smiley sobers and reflects that intelligence officers usually remain aloof from the harsher realities of their work, but sometimes they are forced to confront it, and become a little more humble about the risks they ask their agents to take.

The Circus receives a surprise message from a Polish agent who was thought to have been killed in the aftermath of Haydon's exposure. Despite the risks, Ned is sent to re-establish contact, posing as a Dutch businessman. Once he arrives, he finds that the whole thing is a trap; the agent is long dead, and Ned is arrested and brutally tortured by the Poles' ruthless counterintelligence chief, Colonel Jerzy. Despite this, he refuses to abandon his cover story or reveal any information. Then Jerzy takes Ned to the countryside and tells him that he wishes to spy for the Circus, but will work only through Ned – Ned's interrogation was a test, to make sure Jerzy had the right man as his handler. Over the next five years, Ned runs Jerzy, who provides copious amounts of information about the Polish intelligence. Throughout their correspondence, Ned tries to uncover Jerzy's motive for helping the British, eliminating many known motives such as money, disillusionment, and change of heart, but Jerzy remains opaque to Ned's prying. Ultimately, Jerzy reveals that his "motive" was simply the element of danger it introduced to his profoundly cynical and nihilistic outlook to life.