The Selecao were booed during their first two matches and required victory in this final round-robin fixture to make certain of top spot.
Dani Alves and substitute Willian scored two top-class goals after the restart to render Gabriel Jesus's late penalty miss insignificant as Tite's men picked up the win they were after, which at the same time knocks Peru down to third and leaves them sweating on their place in the last eight.
Following a slow start to the match, Brazil opened the scoring through their first corner as Marquinhos headed the ball against the frame of the goal and Casemiro helped it over the line from a yard out.
Brazil's second followed seven minutes later as Firmino charged down Pedro Gallese's attempted clearance and latched onto the rebound after it came back off the post, leaving the Liverpool forward with the task of rounding the keeper and slotting the ball into an empty net.
Peru, and particularly goalkeeper Gallese, imploded as Everton - having forced his way into the starting lineup after a couple of promising displays from the bench - cut inside from the left and picked out the bottom corner from 25 yards.
After a strong penalty appeal for Everton was rejected, Brazil added a fourth goal to their tally thanks to a fine team move.
Tournament captain Alves exchanged passes with Arthur and then Firmino before thumping the ball past Gallese.
Further off-target shots followed from Arthur and the lively Everton, before Willian rounded off the scoring with a trademark curler from 20 yards after creating some space for himself.
Jesus should have got off the mark at a major tournament for Brazil in added time, only for his penalty to be saved by Gallese, who was at fault for conceding it when tripping the forward.
PERU (4-1-4-1): Gallese; Advincula, Araujo, Abram, Trauco; Tapia; Polo, Cueva (Ballon 67'), Yotun (Flores 46'), Farfan; Guerrero (Gonzalez 55')
BRAZIL (4-2-3-1): Alisson; Alves, Marquinhos, Silva, Luis (Alex Sandro 57'); Arthur, Casemiro (Allan 70'); Jesus, Coutinho (Willian 77'), Everton; Firmino