The Liverpool No.9 teed up Everton attacker Richarlison with a header across goal to make it 2-2 midway into the second half of the clash in Lima.
Firmino was withdrawn soon after, having started the game, and Neymar went on to seal a hat-trick and give Brazil a 4-2 victory.
Fabinho was an unused substitute.
Elsewhere on Tuesday, Xherdan Shaqiri started for Switzerland in their UEFA Nations League tie against Germany in Cologne and featured for 66 minutes of an eventual 3-3 draw.
Takumi Minamino was introduced as a second-half substitute in Japan’s 1-0 friendly win over Ivory Coast in Utrecht.
The Reds forward was sent on in the 61st minute as his country went on to clinch victory through Naomichi Ueda’s stoppage-time goal.
Rhys Williams was an unused substitute in England U21s’ 2-1 defeat of Turkey at Molineux in U21 European Championship qualifying.