Three years have passed since the magician Nathaniel (otherwise known as John Mandrake) helped prevent an attack on London that would have been cataclysmic for its magicians and commoners. Now an established member of the British Government, he faces unprecedented problems: foreign wars are going badly, Britain’s enemies are mounting attacks close to London, and rebellion is fomenting among the commoners. Increasingly distracted with other affairs, Nathaniel is treating Bartimaeus worse than ever.
The British Empire is falling apart. Many commoners are unhappy with the current government, though none of the commoners claim responsibility for the status quo. The magician's demons are being assaulted by the children's natural abilities to see and resist the demons. Some commoners advocate slow reform, while others advocate open revolt, while still others say the commoners should learn how to summon spirits of their own to combat those spirits belonging to the magicians. Ptolemy's Gate concludes with a council of surviving magicians and important commoners trying to work out a government that is beneficial to everyone.
Kitty Jones eventually unearths the reason why humans and spirits are locked into the endless cycle, that humans do not understand the nature of djinni and summon them only as powerful, but dangerous, slaves, not equals. This theory is confirmed by Bartimaeus who states that his greatest master, Ptolemy, was the only human who treated his servants as equals and tried to build a bridge between djinni and humans. However, Ptolemy misguidedly believed many others would follow in his footsteps.
England's domestic turmoil has taken its toll on John Mandrake. Mandrake is friendless and constantly watched by his numerous enemies. In the three years since The Golem's Eye there have been several attempts on Mandrake's life. His years as a high ranking government official have made Mandrake merciless, and he treats all of his servants cruelly, especially Bartimaeus. However, events in Ptolemy's Gate shatter Mandrake's confidence in what he has become. The transformation from Mandrake to Nathaniel is much more rapid than the one from Nathaniel to Mandrake. Nathaniel drops the name John Mandrake all together, as well as the fear of others knowing his true name, humbly telling it to Kitty, with whom he seems to have struck up a newfound friendship, and boldly proclaiming it to the spirit Nouda. With the end of Mandrake, Nathaniel becomes all that Ptolemy hoped to be. Nathaniel willingly allows Bartimaeus to share his body to combat Nouda and his army of hybrids, using Gladstone's staff, a fusion that forever bridges the gap between humans and djinn. However, at the last moment, he dismisses Bartimaeus and then sacrifices himself to destroy the spirit Nouda. This incident was similar to what Ptolemy did in the moments before he died.