Focused and fearless, Mexico continued to trouble Brazil in the opening stages, with Fagner in particular struggling massively to cope with the threat down his side.
Neymar broke the deadlock six minutes into the second half when he finished off a fine team move-that he himself started-from close range.
Just five minutes had passed before Neymar got his first shot away - a 30-yard strike which was palmed away by Guillermo Ochoa - but it was Mexico who had the better of the opening stages and troubled Brazil's backline with their movement and intensity.
It was another painful exit for Mexico, who have failed to play a fifth game at the World Cup since hosting in 1986. The idea was to score quickly and then manage the rhythm of the game.
Headline acts Messi and Ronaldo bid early farewell to World Cup
Ronaldo won Euro 2016 with Portugal and has proven himself to be his country's greatest ever player. Uruguay and Portugal have faced off on two previous occasions, but never at the World Cup .
Mexico were the story of the tournament after two games, beating defending champions Germany 1-0 on the first day and getting past South Korea 2-1 the next match. However, they will be up against a team with an embarrassment of riches, including Neymar, Philippe Coutinho, Thiago Silva and Gabriel Jesus. The world's most expensive player put Brazil in the lead after his back-heel released Willian, who then sent the ball into the penalty area.
Substitute Miguel Layun was fortunate to escape punishment when he appeared to stand on Neymar's leg 20 minutes from time as the two clashed on the touchline, although the Brazil man's histrionics did not help his cause in convincing referee Gianluca Rocchi to brandish a card. Neymar is through on goal, his shot is saved and it falls to Firmino to tap it into an empty net.
Meanwhile Brazil, the favorites to win the competition, extended its unbeaten run to 15 games and will now prepare to face Belgium or Japan in the last eight.
After their slow start it was ultimately no more than the Selecao deserved, as their bid for a sixth world title marches on.