Hartley began the race at the back of the grid and momentarily moved up to 12th after a collision on lap one saw three drivers crash out.
"It's a shame that I had to retire, but I'm happy with the part of the race I competed in - I had a really good start and that was the first box ticked", he said.
The Briton was already up to ninth after 10 laps, with the safety auto deployed after opening lap collisions and led the race before the halfway stage as others pitted and he ran longer.
The four-time champion took the lead at the start and, apart from a period after his pit-stop, controlled an incident-packed race to finish 2.8 seconds ahead of pole-sitter Valtteri Bottas of Mercedes.
"I messed up yesterday and put myself in the worst position", he added.
"Hopefully we can have a better race next time out in Abu Dhabi and close the season on a high".
These turbos have a regulated maximum rotation speed of 125,000rpm, and with the less dense air at altitude the only way to get back the lost engine performance is to run it as near to the maximum as possible for as long as you can.
Sebastian Vettel restored Ferrari pride with victory in the race but it was newly-crowned four-times world champion Lewis Hamilton produced the drive of the day from last to fourth for Mercedes. Hamilton's unassailable overall lead was reduced to 43.
A hectic first lap saw the safety vehicle deployed after Romain Grosjean lost control in his Haas and took out Esteban Ocon while Kevin Magnussen and Stoffel Vandoorne were forced out in a separate battle that also involved Daniel Ricciardo.
Retiring Brazilian Felipe Massa said farewell to his home crowd with seventh place for Williams, the former Ferrari driver then ushered onto the podium to be interviewed in front of the crowd by retired compatriot Rubens Barrichello.