First-half goals from Francisco Cordova and Johan Vasquez put El Tri in control and Alexis Vega added a third after the break before Kaoru Mitoma got a late consolation in a repeat of the 1968 bronze medal match, which Japan won in Mexico City.
Mexico, beaten on penalties by Brazil in their semifinal, were ahead within 13 minutes after Vega was fouled by Wataru Endo. Following a VAR review, the penalty decision was upheld and Cordova sent Japan goalkeeper Kosei Tani the wrong way to open the scoring.
Cordova then turned provider as his free kicks led to headed goals from Vasquez, on 22 minutes, and, on 58 minutes, Vega to put Mexico in total control.
Mexico goalkeeper Guillermo Ochoa pulled off a stunning stop to Mitoma pulling a goal back on 75 minutes as Japan piled on the pressure but the Kawasaki Frontale striker eventually did find the back of the net with an emphatic strike three minutes later.