Ricciardo, of Red Bull, won with a bold and well-judged drive in a dramatic race that saw Hamilton lead from the start, but suffer a second-lap puncture following a collision with Rosberg.
It was Red Bull's 50th win in Formula One and a beaming Ricciardo was hailed with cheers, while Rosberg was booed by the crowd at the end of the race. It appeared that Hamilton was the victim of a misjudged passing move by the German.
"I have apologized to Lewis... A bad result for Lewis and a bad result for the Mercedes team," said Mercedes team chief Niki Lauda.
After struggling to regain his momentum, the 29-year-old Briton retired with four of the 44 laps remaining leaving Rosberg content to take his first podium finish in Belgium at the eighth attempt. He came 3.3 seconds behind the beaming Ricciardo.
More From This Section
It was Ricciardo's third win in six races in his first season with Red Bull since succeeding fellow Australian Mark Webber as teammate to four-time champion German Sebastian Vettel, who came home fifth.
On a welcome dry, if cool, afternoon in the Ardennes, Rosberg made a poor start from his 11th career pole position and Hamilton, from second on the grid, pulled alongside and outside to lead as they surged round the hairpin at La Source.
The 2008 world champion pulled clear on the entry to Eau Rouge and up the hill towards Radillon where a charging Vettel, who had taken second place, attacked without success and ran off track, falling back into third behind Fernando Alonso.