Racing his teammate for the victory, Hamilton briefly took the lead after the second round of pit stops only to run wide and allow the German back through.
Fighting back, Hamilton missed the chicane and mounted the curbs resulting in a puncture. But with smoke also coming from his brakes, his race was over.
Rosberg finished in second place, putting him onto 140 points in the Championship, 22 ahead of Hamilton. "Well I've had a lot of work to do since race one – that is now two DNFs that I have had and zero for Nico," he told Sky Sports F1.
"We will keep pushing and hopefully comeback stronger in the next race."
However, Hamilton's retirement was not the first issue of the day as earlier both the Brit and Rosberg experienced a loss of power.
Mercedes revealed that it was "high-voltage control electronics failure lead to permanent loss of MGU-K drive on both cars in today's race."
Speaking about the issue, Hamilton said: "We knew as a team that we had some problems part of the way through our second stint, but we thought that we would be okay to manage it.
"Not just me, but Nico as well and that is why we were going at the pace we were going. I jumped him in the stop and I was thinking 'wow what an amazing feeling' then straight away that lap the brakes failed so there was nothing I could do.
"The thing is I was following him and when you are following someone you are getting more heat – he was in clean air the whole time in front and so there was not really much I could do. When I finally came out in front I think by then everything was already cooked so there was nothing I could do.
"It was an unfortunate day, but the team still go 18 points which is good, so we will move on and hope we don't have any more DNFs throughout the year.