The duo were bitter rivals for the title this year, with Rosberg emerging on top after a very tense final race in Abu Dhabi, where Hamilton slowed down from the lead to try to get his rivals to overtake Rosberg.
The Briton, however, paid tribute to his rival on Thursday using his Instagram account.
"We said we'd be champions back then, now we both are! Congratulations Nico, you did everything a champion needed to do. Well deserved," wrote Hamilton, who has been competing against Rosberg since his go-karting days.
Rosberg, speaking during the FIA Prize Gala on in Vienna on Friday, said he had already told Hamilton about his decision to quit, as he felt it was the right thing to do.
"I informed Lewis myself before this, it is the right way to do it," said Rosberg.
"We had so many battles and so many moments so I thought correct to let him know of my decision and especially in light of his post yesterday, which was kind of him.
"Maybe we can have a discussion tonight.
"It has been so short notice. The priority was to let team know as quickly as possible. A bit of a compromise for me in not taking enough time to notify everyone who was close to me – so I sent Lewis a message."
Additional reporting by Jonathan Noble