On his Camp Nou bow, the Polish international, who switched from Bayern Munich in the summer, scored after three minutes from a particularly tight angle.
Pedri added the second and fourth goals in the fifth and 19th minutes, sandwiching a strike from Ousmane Dembele.
Pierre-Emerick Aubameyang and Frenkie de Jong completed the rout in the second half.
Lewandowski also played a key part in Pedri’s second goal with an inspired pass to set up the midfielder.
Barcelona begin their La Liga season at home to Rayo Vallecano on Saturday.