Recently released from Craiglockhart Military Hospital, where he has been receiving treatment for shell shock under renowned but neurotic psychiatrist Dr William Rivers, Billy Prior has been assigned to a domestic intelligence unit within the Ministry of Munitions, headed by Major Lode, a decent man whom Prior respects. His job gives him conflicting feelings as he is charged with investigating possible insurgencies and plots within the group of pacifists viewed as the most insidious and therefore scapegoated whenever a plot is suspected or uncovered; as a working class lad, Billy has spent the majority of his life in the lower ranks of society but now, as an officer and "temporary gentleman", he is required to investigate and essentially spy on people which is not an easy role for him to come to terms with.
Billy, having seen many men under his command die painful deaths on the battlefield, has little sympathy with pacifists and conscientious objectors, but nonetheless suspects that Beattie Roper, the woman imprisoned for plotting to assassinate David Lloyd George, was framed. Billy actually wants to investigate the matter further as his history with Beattie Roper is complicated. As a child, she helped raise him when his parents let him slip through the cracks of their drunken arguments; Beattie owned the local shop and Billy remembers asking her every day to tell him all the different kinds of candy she sold only to order the same thing - a bag of gobstoppers - every time.
Billy goes to the prison where Beattie is incarcerated and although she wastes no time in telling him he has betrayed his roots, she also tells him the story from her side. Beattie was known for sheltering "conchies" and deserters, and sheltered a man named Lionel Spragge. He told her about the assassination he was planning and asked her if she would help by getting poison for a dart that they were going to use forthe attempt. In Beattie'a version of the story Spragge was the instigator and she a helper, but in his version, told in court, the plan was Beattie's idea. Spragge is an investigator at the Ministry of Munitions and Prior believes he set Beattie up so that he could have her imprisoned until the end of the war, effectively removing her as a link in the network of people shielding deserters. Prior himself starts to have a problem with Spragge, catching him watching him and following him randomly.
Prior begins a relationship with an upper class officer, Captain Charles Manning, who, like Prior, was a patient of Dr Rivers. Prior does not fear being caught by authorities in the relationship but Manningis paranoid that he has already been found out, and anonymous letters that arrive at his home suggest that he is already on a list of prominent homosexuals under threat of being outed.
Prior returns to his home town to try to get to the bottom of the Beattie Roper case. His visits home have not previously gone well and a confrontation with his father was so detrimental that Dr Rivers advises against any further visits at all; despite this Billy heads home to speak with Beattie's daughter, Hettie, whom he briefly dated, and her husband Mac, who is not so much a pacifist as a fundamental opponent of politicians forcing citizens to fight in a war at all. Hettie is wary of Prior and gives little away but it is clear that somebody is living in the house with her and Prior strongly suspects this to be Mac. He tells her loudly that he is going for a walk down to the cowsheds where the three of them played as children, hoping Mac will hear him and show up there. He does; distrustful of Prior he tells him that if he gives him away he will not be safe as Mac is not a Quaker and is happy to use violence.
Back in London, Prior's fiancé comes to visit and Prior catches Spragge following them through the botanical gardens and onto to river ferry. He confronts Spragge but cannot remember anything else. Sarah fills him in and realizes that his "lost hours" are increasing in intensity. Prior admits to Dr Rivers that he is worried a Jekyll and Hyde complex is developing within him with one persona having no idea or memory of what the other persona is doing. Rivers tries to persuade him out of this belief but is concerned about him particularly as Billy has expressed a desire to go back to the front line in France.
Mac is discovered and arrested; Billy visits him to find out who has given him away and angry that Mac suspects it is him. He is devastated when he talks with Spragge and finds out that he was indeed the person who told the authorities where to find Mac. Prior has no memory of this at all but knows it must be true as nobody else knew where Mac was.
After Mac's arrest, Major Lode's department is downsized and amalgamated with another. In an effort to keep him in London, Manning offers him a position in his department at the Ministry but Prior turns him down, choosing instead to try to return to France.