Zillah Byng-Maddick, chief financial officer, will fill in for King while the company looks for a permanent replacement.
King issued a statement saying: "I have enjoyed five exciting and successful years working with an outstanding team at TMG.
"We have been on an amazing, transformational journey and while I am sorry to be leaving, the business needs a leader to commit long term to the next stage of the company's development."
King joined TMG in May 2007 from his then role as chief executive at Australian classifieds business, Trading Post.
Prior to this, he was general manager of online advertising of Sensis Pty, the group that owns Trading Post.
Tom Hall, chairman of the TMG board, said: "We are tremendously grateful for everything John has achieved at TMG. During his time as chief executive, the group has been widely recognised as providing one of the world's most successful examples of transition from print to digital publishing.Follow @nickbatten2