The Third Policeman is set in rural Ireland and is narrated by a dedicated amateur scholar of de Selby, a scientist and philosopher. The narrator, whose name we never learn, is orphaned at a young age. At boarding school, he discovers the work of de Selby and becomes a fanatically dedicated student of it. One night he breaks his leg under mysterious circumstances– "if you like, it was broken for me" – and he is ultimately fitted with a wooden leg to replace the original one. On returning to his family home, he meets and befriends John Divney who is in charge of the family farm and pub. Over the next few years, the narrator devotes himself to the studyof de Selby's work and leaves Divney to run the family business.
By the time the narrator is thirty, he has written what he believes to be the definitive critical work on de Selby, but does not have enough money to publish the work. Divney observes that Mathers, a local man, "is worth a packet of potato-meal" and eventually it dawns on the narrator that Divney plans to rob and kill Mathers. The narrator and Divney encounter Mathers one night on the road and Divney knocks Mathers down with a bicycle pump. The narrator, prompted by Divney, finishes Mathers off with a spade, and then notices that Divney has disappeared with Mathers's cash box. When Divney returns, he refuses to reveal the location of the cash box and fends off the narrator's repeated inquiries. To ensure that Divney does not retrieve the box unobserved, the narrator becomes more and more inseparable from Divney, eventually sharing a bed with him: "the situation was a queer one and neither of us liked it".
Three years pass, in which the previously amicable relationship between the narrator and Divney breaks down. Eventually Divney reveals that the box is hidden under the floorboards in Mathers's old house, and instructs the narrator to fetch it. The narrator follows Divney's instructions but just as he reaches for the box, "something happened":
It was as if the daylight had changed with unnatural suddenness, as if the temperature of the evening had altered greatly in an instant or as if the air had become twice as rare or twice as dense as it had been in the winking of an eye; perhaps all of these and other things happened together for all my senses were bewildered all at once and could give me no explanation.
The box has disappeared, and the narrator is perplexed to notice that Mathers is in the room with him. During a surreal conversation with the apparently dead Mathers, the narrator hears another voice speaking to him which he realises is his soul: "For convenience I called him Joe." The narrator is bent on finding the cash box, and when Mathers tells him about a remarkable police barracks nearby he resolves to go to the barracks and enlist the help of the police in finding the box. On the way, he meets a one-legged bandit named Martin Finnucane, who threatens to kill him but who becomes his friend upon finding out that his potential victim is also one-legged. The narrator approaches the police barracks and is disturbed by its appearance:
It looked as if it were painted like an advertisement on a board on the roadside and indeed very poorly painted. It looked completely false and unconvincing.
Inside the barracks he meets two of the three policemen, Sergeant Pluck and Policeman MacCruiskeen, who speak largely in non-sequitur and who are entirely obsessed with bicycles. There he is introduced to various peculiar or irrational concepts, artefacts, and locations, including a contraption that collects sound and converts it to light based on a theory regarding omnium, the fundamental energy of the universe; a vast underground chamber called 'Eternity,' where time stands still, mysterious numbers are devoutly recorded and worried about by the policemen; a box from which anything you desire can be produced; and an intricate carved chest containing a series of identical but smaller chests. The infinite nature of this last device causes the narrator great mental and spiritual discomfort. It is later discovered that Mathers has been found dead and eviscerated in a ditch. Joe suspects Martin Finnucane, but to the narrator's dismay he himself is charged with the crime because he is the most convenient suspect. He argues with Sergeant Pluck that since he is nameless, and therefore, as Pluck observed, "invisible to the law", he cannot be charged with anything. Pluck is surprised, but after he unsuccessfully attempts to guess the narrator's name he reasons that since the narrator is nameless he is not really a person, and can therefore be hanged without fear of repercussions:
The particular death you die is not even a death (which is an inferior phenomenon at best) only an insanitary abstraction in the backyard[...].
The narrator calls on the help of Finnucane, but his rescue is thwarted by MacCruiskeen riding a bicycle painted an unknown colour which drives those who see it mad. He faces the gallows, but the two policemen are called away by dangerously high readings in the underground chamber. The following day he escapes from the barracks on a bicycle of unusual perfection.
As he rides through the countryside, he passes Mathers's house and sees a light. Disturbed, he enters the house and finally meets the mysterious and reportedly all-powerful third policeman, Fox, who has the face of Mathers. Fox's secret police station is in the walls of Mathers's house. He tells the narrator that he is the architect of the readings in the underground chamber, which he alters for his amusement, thereby inadvertently saving the narrator's life. Fox goes on to tell the narrator that he found the cash box and has sent it to the narrator's home, where it is waiting for him. He also reveals that the box contains not money but omnium, which can become anything he desires. Elated by the possibilities before him, the narrator leaves Fox's police station and goes home looking forward to seeing Divney once again; on arrival he finds that while only a few days have passed in his own life, his accomplice is sixteen years older, with a wife and children. Divney can see the narrator, although the others cannot, and he has a heart attack from the shock. He shouts that the narrator was supposed to be dead, for the black box was not filled with money but a bomb and it exploded when the narrator reached for it. The narrator leaves Divney on the floor, apparently dying.
Feeling "sad, empty and without a thought", the narrator leaves the house and walks away down the road. He soon approaches the police barracks, the book using exactly the same words to describe the barracks and the narrator's opinion of it that were used earlier, the story having circled around itself and restarted. This time, John Divney joins the narrator on the road; they neither look at nor speak to each other. They both enter the police station and are confronted by Sergeant Pluck, who repeats his earlier dialogue and ends the book with a reprise of his original greeting to the narrator:
"Is it about a bicycle?" he asked.