Mexican driver Sergio Perez delighted the home crowd by finishing third at last year's race
The first race under the new contract with the circuit Hermanos Rodriguez will take place on 27-29 October next year.
Mexico returned to the calendar in 2015, after previous stints on the calendar in the 1960s and from 1986-92.
F1 president and chief executive officer Stefano Domenicali called the atmosphere at the event "incredible".
He added: "Every year the race attracts a large number of passionate fans."
In its latest iteration, Mexico has always been twinned with the US Grand Prix in Austin, Texas, which will be the case again next season.
-- Courtesy of BBC Sport