The Manchester United forward notched a double to ensure the Samurai Blue end the tournament with three consecutive defeats
A double from Javier Hernandez in the second half propelled El Tri to a 2-0 lead in a game initially dominated by their Asian opponents.
Shinji Okazaki tapped home with four minutes to go to ensure a nervy ending, but Hernandez failed to complete his hat-trick, lashing a late penalty against the bar.
With both sides already eliminated from the eight-team tournament, both coaches opted for a couple of changes, with Guillermo Ochoa handed a start in goal for Mexico, and Hajime Hosogai coming in for the suspended Makoto Hasebe in midfield for Japan.
Alberto Zaccheroni's men might've suffered elimination in a classic encounter against Italy on Wednesday, but they started in the same attacking mindset with Shinji Kagawa forcing Ochoa into a smart save inside five minutes.
Moments later, the Samurai Blue also had a goal disallowed amidst a bright opening.
Yasuhito Endo's long range effort took a slight deflection off Shinji Okazaki and past Ochoa, though the German officials had correctly ruled out the strike.
El Tri took their time to find their rhythm but they too created a number of clear-cut opportunities towards the end of what had been a rather disappointing first half for the Concacaf champions.
Jorge Torres' superb delivery picked out Andres Guardado, and the Valencia player's free header cannoned off the post, with Eiji Kawashima well beaten.
Jose Manuel de la Torre's men threatened to take a rather undeserved lead though Jesus Zavala's long-range effort which almost caught Kawashima out as the first half ended in a late flurry of action.
El Tri began the second half much more positively and should've taken the lead.
Giovani dos Santos cut in from the right and produced a stinging effort which would be brilliantly blocked by Hosogai. From the resulting corner, Raul Jimenez's header was saved.
But Mexico continued the pressure and were rewarded with the opener with Japan floundering.
A fine delivery from the left by Guardado saw Hernandez capitalise on some lax defending to power home on 54 minutes.
Japan showed signs of intent following that setback and were close to earning a reprieve.
Ryoichi Maeda's left-footed drive flashed wide of the post, before Guillermo Ochoa hurriedly denied Shinji Okazaki, but they were to fall further behind once more.
Another set-piece was flicked on, towards Hernandez who doubled his tally with an easy header on 66 minutes.
For all their perseverance, Japan were not to be denied, as Okazaki made it 2-1 with five minutes to go. Kagawa and Endo combined, with the latter squaring for the forward to beat Ochoa.
Hernandez had the chance to seal a hat-trick after being pulled down by Atsuto Uchida, but the Man Utd striker saw his penalty saved by Kawashima before his rebound crashed off the woodwork.