Aleksandar Prijovic's opener and second goal were the bright sparks in an otherwise forgettable first half for the visitors, who found themselves 5-2 down at the break.
Marco Reus, who went on to score a hat-trick, Shinji Kagawa, Ousmane Dembélé and Nuri Sahin had all scored before the interval.
While Michal Kucharczyk and Nemanja Nikolic netted for Legia after the break, Felix Passlack and the remainder of Reus' goals capped off an incredible evening.
Thomas Tuchel made nine changes from the side that beat Bayern Munich 1-0 to five their title charge a shot in the arm on Saturday. Only Marc Bartra and Matthias Ginter remained, while Reus returned after his injury lay-off and Roman Weidenfeller replaced the injured Roman Bürki.
On the other hand, following their 4-1 win over Jagiellonia Bialystok, Legia and Jacek Magiera opted for four alterations. Arkadiusz Malarz, Adam Hlousek, Valeri Kazaishvili and Nikolic all dropped out as Radoslaw Cierzniak, Jakub Czerwinski, Kucharczyk and Prijovic earned starting berths.
Goals, goals and more goals
Despite dominating possession and territory, Dortmund found themselves behind after 10 minutes. A greatly ball into the channel found Vadis Odjidja-Ofoe, who beat Bartra to the ball before driving to the box. He cut back to Prijovic, who produced a quite superb, curling, outside of the boot effort into the far corner from 16 yards.
But Dortmund were not behind for long and what followed was very similar to what occurred in Warsaw. The onslaught that would follow began with the recurring theme of Dembélé being the key creator. He set up the first goal with an inventive cross along the face of goal, which Kagawa headed home at the back post.
One became two a minute later as the same combination came together to great effect, with Dembélé the driving force for a Dortmund counter before squaring to Kagawa. The Japan international shifted past his man before firing home. A third goal followed within 120 seconds, with Cierzniak punching the ball in off of Sahin's gleeful face.
But the nerves were jangling once more when a quick move down the right culminated in Bartosz Bereszynski squaring to Prijovic, who swept the ball past the helpless Weidenfeller. It could have been even worse had Prijovic's close range chip landed under and not on the crossbar, in what was a pulsating game.
Yet Dortmund would take control before the break as a great ball and hold up play from Reus saw the returning forward play into the path of Dembele, who finished coolly past Cierzniak. Some super play from Sahin and Kagawa then set up Reus for his first, another tap-in, as Kagawa was denied a hat-trick by the offside flag late on.
Goals, goals and more goals
After seven first half goals, the teams would be forgiven had they decided to ease up. However, it never really looked like things would slow down whatsoever. Just seven minutes into the second half, another Dembélé assist found Marco Reusing in unmarked to grab his second goal of the game.
Yet there would be a response from Legia, who hit back through a classy counter. Michal Pazdan picked up the ball and quickly picked out Miroslav Radovic, and the forward make no mistake in playing Kucharczyk through on goal to slide home. The two sides continued to trade blows as they aimed to add to the scoreline.
A final flurry of goals came in the last 10 minutes to put the game into the record books. It was a night to remember for Passlack, who grabbed his first Dortmund goal in a move made by Christian Pulisic. Nikolic added a fourth for Legia with a well-taken low strike, before Reus grabbed his third and BVB's eighth.
Dortmund now just need a point in their final game against Real Madrid to ensure progression as group winners. Legia, on the other hand, will have to beat Sporting CP to seure their spot in the UEFA Europa League.