The 31-year-old German sealed his first F1 title
after a thrilling final race of the 2016 season
in Abu Dhabi Sunday, edging out Mercedes teammate Lewis Hamilton.
"I have climbed my mountain, I am on the peak, so this feels right," he wrote on his Facebook page.
Rosberg, the son of Finland's 1982 world champion Keke, first raced in F1 with Williams in 2006 and joined Mercedes in 2010.
He clinched 23 career wins and finished on the podium 57 times in 206 races. His record places him 12th on the all-time list of drivers alongside Brazilian Nelson Piquet.
He beat Hamilton to the title by five points after a season-long tussle he described as "so damn tough."
"Since 25 years in racing, it has been my dream, my 'one thing' to become Formula One world champion," he wrote.
"Through the hard work, the pain, the sacrifices, this has been my target. And now I've made it.
"My strongest emotion right now is deep gratitude to everybody who supported me to make that dream happen."
The rivalry with childhood karting friend Hamilton was controversial and at times bad tempered, culminating in that final race when the Briton was accused of defying team orders by driving slowly to allow others to pass Rosberg and deny him the title.
Rosberg had finished second behind Hamilton in the drivers' championship for the previous two years, but reliability issues with the Englishman's Mercedes gave his colleague the upper hand this season.
"I pushed like crazy in every area after the disappointments of the last two years; they fueled my motivation to levels I had never experienced before," said Rosberg, whose first F1 win came in China in 2012.
"And of course that had an impact on the ones I love, too -- it was a whole family effort of sacrifice, putting everything behind our target. I cannot find enough words to thank my wife Vivian; she has been incredible."
Rosberg said he had been thinking about retiring since winning the Japanese Grand Prix in Suzuka in October, and went into the Abu Dhabi finale knowing it could be his last race.
"That feeling cleared my head before the start," he said. "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."
Rosberg, who is the first reigning F1 champion to retire since Frenchman Alain Prost in 1993, made his decision Monday.
"The only thing that makes this decision in any way difficult for me is because I am putting my racing family into a tough situation," he said. "But Toto [Mercedes boss Toto Wolff] understood," he said.
"My proudest achievement in racing will always be to have won the world championship with this incredible team of people, the Silver Arrows."
Wolff said in a statement:
"This is a brave decision by Nico and testament to the strength of his character."
Rosberg added on Facebook Live shortly after announcing his decision: "I'm 1000% sure I'll be happy with this new direction."
Mercedes has yet to announce a replacement for Rosberg for 2017.