The Santos Laguna striker scored on either side of halftime, before a late Hulk goal gave the Selecao hope.
El Tri got off to a dream start when it took advantage of Brazil's casual passing, creating a turnover which fell to Peralta at the top of the box. The Santos Laguna striker drove a low shot to the near post and 30 seconds in, the game had its first goal.
Mexico continued to harass the Brazilians, with Oscar only able to carve out a half-chance 20 minutes into the match. Just 31 minutes into the match, Mano Menezes felt it was time for a change, and yanked Alex Sandro off the pitch in favor of Porto attacker Hulk.
It didn't take long for Hulk to announce his intentions, as he blasted a 30-yard strike that swerved and dipped in the air, and had to be palmed away by Mexico goalkeeper Jose Corona.
Brazil was on the front foot as the second half began, but Mexico harried and harassed the Selecao, putting the side out of its comfort zone. Neymar got a half-chance, but blazed a shot over from inside the box.
Against the run of play, Mexico nearly found a second goal in the 63rd minute. Marco Fabian lifted the ball off Thiago Silva before getting an overhead kick on a bouncing ball that struck the crossbar.
With 15 minutes to play, El Tri did find its second. Off a free kick from the right flank, Peralta completely lost his mark and got a firm header on Fabian's cross, powering his side into a two-goal advantage.
Brazil did find a goal late, as Hulk was sent through behind the Mexican defense, and the Porto striker finished low with his right foot. There was only stoppage time for the Selecao to grab an equalizer, and it almost did when Oscar was left unmarked at the near post, but could only direct his header over the bar.
The chance was to be the last of the game, and with the full-time whistle, Mexico could celebrate an incredible triumph at Wembley Stadium.