Miranda headed an injury-time winner as Brazil beat South American rivals Argentina to win a four-team friendly tournament in Saudi Arabia.
The defender was left unmarked at the near post to head home from a corner.
It was a dramatic finale to what had been a drab contest of few chances at King Abdullah Sports City stadium.
Neymar, Philippe Coutinho and Roberto Firmino all disappointed against an inexperienced Argentina side lacking star names, including Lionel Messi.
With Sergio Aguero, Gonzalo Higuain and Angel di Maria also absent, the game will be heartening for temporary boss Lionel Scaloni, despite defeat, after a defensive but disciplined and committed display from his young side.
His Brazilian counterpart Tite will have more concerns following a largely uninspiring and flat performance from a team with too much attacking talent to offer any convincing excuses.
It was Miranda who went closest throughout the game, heading over from a corner and seeing a shot blocked on the line by Nicolas Otamendi in the first half before making his decisive contribution in the second minute of added time in the second.
The closest Argentina came to a goal was a Paulo Dybala free-kick that cleared the crossbar by a foot.