Barca’s captain curled home a stunning free-kick to open the scoring before Luis Suarez’s clever 20-yard lob hit the crossbar.
The impressive Ousmane Dembele spun to lose two defenders and blasted home Barcelona’s second from outside the box.
Messi half-volleyed Ivan Rakitic’s aerial pass home for their third before Barcelona defender Samuel Umtiti was sent off for two yellow cards.
The 10 men got a fourth goal when Suarez picked out Messi, who guided the ball past goalkeeper Jeroen Zoet from 15 yards.
The other game in Group B saw Inter Milan come from behind to beat Tottenham 2-1 at the San Siro.