The Queen approved the Royal Charter last month, which is backed by the three main parties and establishes a body to oversee the country's new press regulator.
Speaking at the magazine's Parliamentarian of the Year Awards, the London Mayor said: "Our ruling parties are daily purged and disinfected by a free press.
"I urge all editors to follow the Spectator's lead in rejecting the Royal Charter and tell the Privy Council to stick its charter in the privy!"
TOP STORIES OF THE DAY
Johnson also took time to praise the Spectator's publisher, BBC presenter Andrew Neil, on "being the world leader of digital penetration".