The Polish club are playing in the group stages for the first time in 20 years, and their inexperience at this level has been exposed repeatedly.
Legia conceded 16 goals in their first four group games, and shipped a further eight at the Westfalenstadion on Tuesday.
That leaves them level with BATE Borisov’s record for the most (24) goals conceded in a Champions League group stage.
Legia actually took the lead in Germany courtesy of Aleksandar Prijović. The Swiss forward used the outside of his boot to bend a delightful shot past Roman Weidenfeller, but their joy was short-lived.
Fewer than eight minutes later Dortmund were ahead. Shinji Kagawa scored twice in 90 seconds to turn the contest on its head.
Nuri Sahin then headed in a fourth before Prijović pulled one back with his second. Ousmane Dembele then danced through the visiting defence to restore Dortmund’s two-goal lead and Marco Reus added another before half time.
It was the first time in Champions League history a game has seen seven goals before the break, and more were to come in the second half.