The Briton was in control from the start, converting his pole position into a lead at the first corner and controlling the race.Rosberg was unable to keep up, and concentrated on ensuring he stayed ahead of Red Bull’s Sebastian Vettel.
Ferrari’s Fernando Alonso took fourth after Red Bull’s Daniel Ricciardo hit trouble.
Force India’s Nico Hulkenberg was fifth.
Hamilton dedicated the win to the families of the passengers lost in the disappearance of flight MH370.
“Incredible,” he said. “After such a difficult weekend and a long winter, I just feel so grateful. I’d really like to dedicate it to the families, after such a tragedy three weeks ago.
“The team were spot on with all the pit stops and calling and timing, the info was spot on. What a great car, what a great job from everyone.”
Team-mate Rosberg added: “I got a great start and that allowed me to get into second place. In Turn Three I got a bit sideways, plenty of action there – but it worked out well. Then it was just a question of trying to keep up with Lewis, but he was a bit too quick today.”
Ricciardo was running fourth as he came in for his third pit stop on lap 40, with 16 laps to go.
But he left the pits before the left-front wheel had been properly secured and had to stop in the pit lane and be pulled back by his mechanics for the wheel to be properly attached.
The delay cost him an entire lap to Alonso, who was close behind when Ricciardo pitted. Three laps later Ricciardo suffered a further blow when his Red Bull’s right-front wing mount failed and he had to tour round almost an entire lap before pitting for it to be replaced.
He was then given a 10-second stop-go penalty for the unsafe release from the pits, before retiring with five laps to go.
To add to the Australian’s woe, he was handed a 10-place grid penalty after the race for the same offence, which will affect his starting position on the grid in Bahrain next week.
A good start by Ricciardo from fifth on the grid had put him third on the first lap behind both Mercedes drivers and ahead of Vettel and Alonso.
Vettel passed him at the start of lap three and Alonso followed closely until the first pit stops.
Stopping one lap earlier than Ricciardo meant Alonso was narrowly ahead as the Australian emerged from the pits, but the Red Bull re-passed the Ferrari into Turn Two and was able to edge ahead more effectively than during the first stint, holding the position until hitting trouble.
The Mercedes cars were well clear of the action behind them, and Hamilton was in a class of his own at the front.
He pulled out two seconds on the first lap, and was four seconds ahead of his team-mate by lap three, after which he was able to measure his pace while still edging clear.
Hamilton underlined his superiority with a fastest lap with three laps to go, 1.5secs quicker than anyone else was lapping at the time. He also used less of his 100kg fuel allowance than any other driver in the top 10.
Hamilton retired from the first race of the season while Rosberg won, and victory at Sepang reduced his deficit to his team-mate in the championship to 18 points.
Behind him, Rosberg struggled in the initial stages with overheating rear tyres and had to be wary of Vettel behind him throughout the race.
Vettel kept his countryman in sight through the first pit stops and the second stint of the race, and when he stopped for the second time on lap 31, a lap ahead of Rosberg, he was less than a second behind the Mercedes.
But Rosberg again began to edge clear, pulling out 1.7secs over four laps, to lap 37, to consolidate second place.
Rain threatened as the race headed towards its closing stages, but a few drops with around 16 laps to go did not turn into the usual tropical afternoon deluge.
Hulkenberg tried to beat Alonso by doing only two stops to the Ferrari’s three, but on fresher tyres the Spaniard was comfortably able to close the 14.3-second deficit after his final pit stop, made with 12 laps to go.
Alonso was consistently two seconds a lap faster and he passed Hulkenberg for fourth on lap 53 after a brief but spirited defence from the German.
McLaren’s Jenson Button took sixth from the Williams of Felipe Massa, who ignored a team order in the closing stages to let Valtteri Bottas past so he could challenge Button.
The second McLaren of Kevin Magnussen was ninth after needing a new front wing early in the race following a second-lap collision with Kimi Raikkonen’s Ferrari, which also earned Magnussen a five-second stop-go penalty.
The incident caused Raikkonen a puncture and dropped the Finn to the back of the field. He recovered to finish 12th, behind Toro Rosso’s Daniil Kvyat, who took the final point in 10th for the second race in a row, and Lotus’s Romain Grosjean.