Sebastian Vettel, his nearest challenger for the 2018 crown, needed to win the race but his Ferrari ended the contest in second place behind Max Verstappen’s Red Bull.
Only Michael Schumacher with seven titles stands ahead of Hamilton.
With two Grand Prix left of the 21 race season, Hamilton can flaunt the success of his Mercedes in Brazil on 11 November and a fortnight later in Abu Dhabi.
“I think it’s going to take a while to kick in,” said Hamilton after the race at the Autodromo Hermanos Rodriguez. “Of course I’ve dreamed of this moment and I have worked for it. But did I know I was going to get number five? Of course not.”
“It’s Lewis’s day,” said Vettel munificently. “Congratulations to him. I think he was just the better man. Full stop.”
Vettel, who has won four world championship titles, added: “I’ve told him to keep pushing for next year as I need him good to fight him again.”