Dortmund made sure of top spot in Group F after fighting back from 2-0 down against defending champions Madrid, leaving the Spanish giants with theoretically a tougher draw to make the quarter-finals.
Marco Reus was the star of the late show at the Santiago Bernabeu, hitting the equaliser two minutes from time.
A double from Karim Benzema looked to have Real well set to leapfrog the Germans and secure a home game in the second leg of their last-16 tie.
Dortmund scored 21 goals in their group campaign, the most for any team in a group stage in the history of the tournament.
More From This Section
"Real had some big chances in the second half, but we hoped for a lucky punch and we got it," said Reus.
"'Auba' was world-class with his pass and I was happy to get on the end of it -- the goal was 99 percent him and one from me."
Sevilla made the last 16 for the first time in seven years after soaking up the pressure to draw 0-0 away to Lyon.
But they could not find a way through, with Corentin Tolisso and Mathieu Valbuena both hitting the woodwork in the first half.
Table-topping Juventus defeated Dinamo Zagreb 2-0 with Gonzalo Higuain and Daniele Rugani on target.
- Leicester claim unwanted record -
===================================
Leicester City, who had already made sure of top spot in Group G in their debut season in the competition, suffered their first loss of the campaign, 5-0 at Porto who went through as runners-up.
Porto, the 1987 and 2004 European champions, opened the scoring after just six minutes when Andre Silva headed in a corner from Jesus Corona.
Corona hit a spectacular second goal with a left-footed volley from a cross by Yacine Brahimi after being left unmarked in the area. Brahimi made it 3-0 with a cheeky backheel before the interval.
Silva added a fourth from the penalty spot on 64 minutes after Danny Drinkwater had hauled down the striker in the penalty area with Diogo Jota making it 5-0, the biggest Champions League defeat for an English club.
In Group E, Bayer Leverkusen, already assured of second spot, downed Monaco 3-0 but the win wasn't enough to overhaul the table-topping French side.
Tottenham Hotspur, meanwhile, came back from a goal down to defeat CSKA Moscow 3-1 and claim a Europa League place.
Alan Dzagoev put the Russians ahead after 33 minutes, but the lead lasted just five minutes until Dele Alli levelled from a Christian Eriksen cross to ensure that CSKA goalkeeper Igor Akinfeev's miserable Champions League record of failing to keep a clean sheet stretched to 39 games.
England star Kane admitted that Tottenham need to improve their home form if they are to progress in future European adventures.
"You are playing the best teams in Europe so you can't rely on away results which we have done this season," said Kane.
The teams who have made it to the last 16 are Arsenal, Atletico Madrid, Barcelona, Bayer Leverkusen, Bayern Munich, Borussia Dortmund, Juventus, Leicester City, Manchester City, Monaco, Paris Saint-Germain, Real Madrid, Napoli, Benfica, Porto and Sevilla.
The draw takes place on Monday.