The Briton, however, had nearly backed off while still a lap away from victory after the chequered flag was waved early in a blunder that led to a post-race revision of the results.
"That was very strange. I was thinking 'Am I seeing things?'," the Mercedes driver said after the Chinese Grand Prix. "I looked up, I was coming across the line expecting to do another lap and all of a sudden I looked and saw the flag, I lifted for a second and saw there was no-one on the wall, so then I just kept going."
The win was the 25th of Hamilton's career and drew him level with Scot Jim Clark and his current Mercedes boss, triple world champion Niki Lauda, in the all-time winner's list.
It is also the first time that Hamilton - who on Saturday moved ahead of Clark to become the top British qualifier - has managed to win three races in a row. "I just can't believe how amazing the car is," added the Briton, who led from pole. "I was just really racing myself. This team is on a roll, that's for sure."
Fernando Alonso, winner of last year's race in China, finished third to give Ferrari their first podium of the season, watched by new team principal Marco Mattiacci - who took over from Stefano Domenicali three weeks ago. "Being here on the podium is some kind of surprise for us, it's a nice surprise finally," the double world champion said. "(I'm) happy with the podium finish, third in the drivers' championship. So we didn't have the start of the season that we like but at the end of the day we are still in the fight."
"I think this podium should be dedicated to Stefano, as everything we do up to July will also be the result of his efforts," added Alonso. "We have definitely made a step forward, because compared to two weeks ago, we have partly closed the gap to the leaders, but we are well aware there's still a long way to go."
The double world champion is third in the standings, 38 points adrift of championship leader Rosberg, who remains four points clear of Hamilton, despite not having won since the season-opening Australian Grand Prix.
Daniel Ricciardo maintained his early-season edge over Red Bull team mate Sebastian Vettel, the Australian crossing the line fourth ahead of the quadruple world champion, who was asked to let the faster Ricciardo through for the second race in a row.
"What tyres is he on?" Vettel asked his team when instructed to let Ricciardo go past. When told he was on the same tyres as him, the 26-year-old responded: "tough luck".
Force India followed their Bahrain podium with another double points finish as Nico Hulkenberg took sixth and Sergio Perez ninth.
The Silverstone-based team dropped a place in the constructors' standings to Red Bull, but are still third, ahead of Ferrari.
Williams were again left to ponder what might have been after failing to make the most of a strong qualifying result. Valtteri Bottas scored the team's only points in seventh, while Felipe Massa's race was ruined by a collision with Alonso's car at the start and a lengthy first stop as his crew struggled to change his left-rear tyre. McLaren failed to score a point for the second consecutive race, with Jenson Button and Kevin Magnussen crossing the line eleventh and thirteenth, respectively.
The flag error had led to the 56-lap race being shortened by two laps in accordance with the sport's technical regulations with the running order as it stood on lap 54 declared official.
The rule stipulates that if for any reason the flag is waved before the leading car has completed the scheduled number of laps, the race will be deemed to have finished when the leader last crossed the line on the previous lap.
The adjustment had no impact on those scoring points but Caterham's Kamui Kobayashi was moved back a place to 18th after he passed back-of-the-grid Marussia rival Jules Bianchi on what should have been the last lap.
"It's a real shame that my move on him on the last lap now doesn't count due to the mistake with the chequered flag, something we had nothing to do with," said the Japanese.
Such places matter for small teams such as Caterham, which have never scored a point and their final position at the end of the season will be decided on placings and a possible countback as far as 17th and 18th.
"It had been good to see what a small victory like that does for the team as it lifted everyone at the end of a very tough first four races of 2014," said Kobayashi.