The central defender rose at the near post to beat Argentina keeper Sergio Romero to a Neymar corner and head home the winner, deciding a game that was set to go to penalties to determine a winner.
"Scoring a goal against Argentina is always gratifying and always exciting," Miranda said.
Argentina are one of only two teams to have beaten Brazil since Tite took over as coach in 2016, but without Lionel Messi, who is taking a sabbatical from international football, they rarely troubled their neighbours in a derby match dubbed the Superclasico.
Miranda should have put Brazil 1-0 up in the 28th minute when a Casemiro cross fell to him just metres from goal, but his scuffed shot was blocked on the line by Nicolas Otamendi.
Paulo Dybala went close with a swerving free kick for Argentina from just outside the box a minute later and Leandro Paredes watched a long-range effort drift just wide early in the second half.
Argentina improved considerably after the break, but Brazil still had the better chances, with Romero parrying away a fierce volley from Arthur after 70 minutes and Casemiro almost grabbing the winner with seven minutes left only to see his deflected free kick curl wide.
"The team felt tired in the second half but I think we dominated our opponents, we played well and we got the goal at the end," said Brazil's Filipe Luis.
The defeat was the first in four games for Lionel Scaloni, the interim coach who replaced Jorge Sampaoli after the Russia World Cup.
It extends Brazil's run to four wins in four games since they were knocked out the World Cup in the quarter-finals by Belgium.