Neymar scored one goal and played a key role in the second as Brazil edged out Mexico in Samara to reach the World Cup quarter-finals for a seventh consecutive time.
Brazil did not have it all their own way, especially in an opening period dominated by the Central Americans, but the five-time winners grew into what became a controlled performance.
It means Mexico are once again eliminated at the last-16 stage - as they have been at every World Cup since 1994.
They did have plenty of chances early on, and it was only after a largely frustrating first half for Brazil that Neymar started the move to put his side ahead.
His run across goal and clever backheel won Willian space, and the Chelsea midfielder only needed two touches to drive into box and lay the ball across for the world's most expensive player to slide home.
It was Brazil's 227th goal at the World Cup, meaning they overtake Germany as the all-time top scorers.
Just moments earlier, Mexico's Jesus Gallardo wasted a brilliant chance when he shot wildly over the crossbar instead of playing in Hirving Lozano.
For much of the second half, Mexico's bright start was just a memory, but Carlos Vela forced a save from Brazil goalkeeper Alisson with his side's first shot on target not long after going behind.
In the match's closing stages they rallied once more, but Brazil defended stoically before doubling their lead on the break through a Roberto Firmino tap-in after Neymar's effort was diverted by the toe of Mexico goalkeeper Guillermo Ochoa.
Brazil will face Belgium or Japan - who meet in Rostov-on-Don in the day's second match - in their last-eight tie in Kazan on Friday.
Latest Stories
-
Burnley sign partnership deal with fan-backed scouting platform Nordensa
12 mins -
Akesse Brempong, MOG Music, Afronita, Dope Nation to perform at Nsoromma Season 6 Grand Finale
16 mins -
Hopeson Adorye to form ‘Jail Them’ advocacy group
1 hour -
Shatta Wale once cried and knelt to apologise to Mahama – Dr Lawrence Tetteh
2 hours -
Former UK Prime Minister Boris Johnson turned away from polling station after forgetting photo ID
2 hours -
Nigeria soldiers face trial for deadly air strike ‘mistake’
2 hours -
Akufo-Addo, Otumfuo to commission Kumasi International Airport on May 10
2 hours -
PWDs who gain admission into tertiary institutions will be prioritised with government scholarships – Bawumia
2 hours -
Strongman regrets involving Fella Makafui in Medikal feud
2 hours -
NPP must unite now or perish later – Ameyaw-Akumfi warns
2 hours -
Fuel price adjustment: petrol surges to GH₵15.22, diesel falls to GH₵14.65
2 hours -
Kojo Golden nominated for Afrobeat Artiste of the Year at Ghana Music Awards USA
2 hours -
Ford Foundation partners foster collaborative solutions for host Community Development Trusts implementation in Nigeria
2 hours -
Appiatse reconstruction: Support Bawumia to do more for Ghana – Richard Ahiagbah to Ghanaians
3 hours -
I wanted Harry Kane at Man United – Ten Hag
3 hours