Brazil, who have already qualified for the 2018 World Cup, were searching for their 10th straight victory under head coach Tite, but it was Jorge Sampaoli that enjoyed success in his first game in charge of Argentina.
The big news from the Brazil camp was that Paris Saint-Germain's Thiago Silva captained the Selecao on his first international start in two years.
Weverton earned just his second cap between the sticks, while Fagner and Gil were given rare chances to impress at the back. Further forward, Renato Augusto, Chelsea's Willian and Liverpool's Philippe Coutinho supported Manchester City's Gabriel Jesus, but Neymar missed out altogether.
As for Argentina, Sampaoli's first selection was a very interesting one. There were two Premier League representatives - Sergio Romero and Nicolas Otamendi - while Lionel Messi, Paulo Dybala, Angel di Maria and Gonzalo Higuain were all in the XI. Further back, there was an international debut for Lanus defender Jose Luis Gomez.
It was Argentina that had the game's first chance in the sixth minute after Di Maria broke into the Brazil box, but the Paris Saint-Germain attacker smashed the post with a powerful effort from a narrow angle.
Brazil's first sight of the Argentina goal arrived in the 16th minute when Coutinho showed wonderful acceleration to drive down the right before picking out a low cross towards Willian, although Otamendi was on hand to clear behind.
Six minutes later, Brazil had another opportunity when Willian drove into the Argentina box before cleverly picking out Coutinho, but the Liverpool attacker took too long to have a strike, and Otamendi was again across to make the block.
As expected, there was a competitive edge to the friendly, and tempers flared just past the 30-minute mark when Jonathan Maidana chopped Gabriel Jesus to the deck with a late challenge, which saw the Argentine centre-back pick up a yellow card.
Higuain had a half-chance for Argentina five minutes before the break after meeting a free kick from Messi, but his header was straight at Weverton, before Di Maria tested the Brazilian goalkeeper with a low drive moments later.
Dybala was next to try his luck for Sampaoli's side after looking to pick out the top corner with a curling effort, but the Juventus forward just missed the post.
Argentina were not to be denied, however, and they deservedly took the lead in the final minute of the first period when Mercado turned home from close range after fellow defender Otamendi had hit the post with a header.
Joaquin Correa and Nicolas Tagliafico both came off the bench for their Argentina debuts in the early stages of the second period, and it was Sampaoli's side that continued to look the team more likely to add to the scoring, with Di Maria just missing the target once again in the 58th minute.
Coutinho looked to pick out the bottom corner just before the hour as Brazil started to threaten in the second period, but Paulinho blocked his teammate's shot, before Romero was forced to claw away an effort from Gabriel Jesus.
Brazil had two glorious chances to level in the 62nd minute when Gabriel Jesus rounded Romero before looking certain to slide home, but the Man City forward somehow hit the post, before Willian smashed the woodwork from the rebound as Argentina survived twice in quick succession.
West Ham United's Manuel Lanzini was also handed his Argentina debut in the 81st minute during a period where both managers looked to their bench, but clear chances were few and far between in the latter stages.
Brazil continued to press for a leveller into the final moments, but Argentina held on to record a morale-boosting win ahead of some key World Cup qualification fixtures.