The 31-year-old German sealed the championship after a dramatic season finale in Abu Dhabi on Sunday.
In a Facebook post, Rosberg said: “Since 25 years in racing, it has been my dream, my ‘one thing’ to become Formula One World Champion.
“Through the hard work, the pain, the sacrifices, this has been my target.
“And now I’ve made it. I have climbed my mountain, I am on the peak, so this feels right.”
Mercedes said he “will stop racing in Formula One with immediate effect”.
In his note, Rosberg spoke of the sacrifices he made throughout a “damn tough” season and the toll it took on his life and his family.
He said he began thinking of retirement after winning in Suzuka in early October, “when the destiny of the title was in my own hands”.
Going into the race on Sunday, he knew it could be the last one of his life.
“I wanted to enjoy every part of the experience, knowing it might be the last time… And then the lights went out and I had the most intense 55 laps of my life.”
On Monday evening, he said, he made up his mind and told his wife Vivian and members of his team, including executive director Toto Wolff.
Rosberg won the drivers’ title by finishing the race in second place. His Mercedes teammate Lewis Hamilton won the race but lost the tile by five points.
Mr Wolff said Rosberg had made a “brave decision”.
“He has chosen to leave at the pinnacle of his career, as world champion, having achieved his childhood dream,” he said.
“The clarity of his judgment meant I accepted his decision straight away when he told me.”
Rosberg is the son of 1982 world champion Keke.
They are only the second father and son to be crowned champions in F1 history following the victories of Graham and Damon Hill.
Rosberg is also the only driver to win the championship apart from Sebastian Vettel and Hamilton since 2009.