Barcelona already topped Group F but confirmed its place in the next phase, with Dortmund 's fate no longer in its own hands on the closing matchday.
Luis Suarez scored from Messi's pass to open the scoring at Camp Nou and then turned provider for the skipper as Barca scored twice in the space of five first-half minutes.
Messi, reportedly set to win a sixth Ballon d'Or next week, added a second assist to a typically glittering individual display by setting up Antoine Griezmann to seal matters after the break with substitute Jadon Sancho firing home late on for Dortmund.
Nico Schulz almost scored a second-minute opener for Dortmund but found Marc-Andre ter Stegen equal to his effort with Messi then unusually wasteful from a free-kick at the other end.
Suarez was flagged offside after converting Messi's through-ball but the same combination led to the opener in the 29th minute, the Uruguay striker coolly converting.
Messi added a second, an arrowed finish from Suarez's pass, with Barca bursting into life after ex-Dortmund forward Ousmane Dembele had to be replaced by Griezmann due to a thigh injury.
Under-fire Dortmund boss Lucien Favre sent on Sancho at the break and Messi was then booked for diving by referee Clement Turpin after going down easily in the box.
Ter Stegen saved from Julian Brandt on the hour and that miss proved key as Barca broke clinically, Messi sending Griezmann clear to slot home his first Champions League goal for the club.
Sancho smashed home a super strike to give Dortmund a consolation, but they must better Inter's result at home to Barcelona when the Bundesliga side face Slavia Prague at home next month.