It was Rosberg’s third win in a row, his first in Singapore and the 22nd of his career, while Hamilton had to settle for third behind Australia’s Ricciardo in a tactical night race on the Marina Bay street circuit.
Ferrari’s Kimi Raikkonen was fourth while teammate and last year’s winner Sebastian Vettel finished fifth after starting last on the grid, with Red Bull’s Max Verstappen sixth.
Rosberg held on in a tense last lap to take the chequered flag 0.4 seconds ahead of Ricciardo. He moves to 273 points, eight ahead of Hamilton, with the Malaysian Grand Prix next up in two weeks.
The safety car was immediately out after Force India’s Nico Huelkenberg’s race ended after just a few seconds when he came off worse in a tangle with the Toro Rosso of Carlos Sainz.
Huelkenberg was sandwiched between two Toro Rossos and his car was spun sideways into a wall.
“When you only get to 50 metres it is very bitter,” the German said. Haas driver Romain Grosjean was meanwhile unable to start because of a brake problem.
Rosberg kept his lead from pole following the safety car when the restart saw a marshal still on the track but able to run to safety as cars approached. Both Rosberg and Hamilton were warned early in the race they would have to manage their brakes, which appeared to be a concern for the team throughout the race.
With overtaking difficult on the 5.065-kilometre street circuit, tyre strategies were the key to gaining places.
Ricciardo, in second place, switched tyres on the 16th lap where he was fitted with a new set of supersoft tyres.
Ricciardo pitted again on lap 33 of the 61 with the hope it seemed of taking soft tyres to the end of the race.
He swapped tyres to supersofts with 13 laps to go. Rosberg was told to push hard, but Mercedes decided against another pit stop in the belief he could defend his lead of around 18 seconds against the Red Bull’s faster tyres. Another safety car phase might have ruined Rosberg’s chances but Mercedes could breathe a sigh of relief as the German, no longer nursing his brakes, took the chequered flag just ahead of Ricciardo.