The humiliating defeat completed a miserable week for Real, who have monopolised the competition since 2016 and are now left with nothing to fight for this season after back-to-back defeats to Barcelona had knocked them out of the Copa del Rey and effectively ended their La Liga title hopes.
Coach Santiago Solari may yet cling to his job until the end of the season but surely stands no chance of remaining for the next campaign after overseeing an almighty collapse to an exciting yet largely inexperienced Ajax side.
Moroccan midfielder Hakim Ziyech fired the Dutch side into a shock seventh-minute lead after a lay off from the outstanding Dusan Tadic, who also provided the pass for David Neres to double the Dutch side’s advantage in the 18th.
Madrid, who were missing inspirational captain Sergio Ramos through suspension and hit the woodwork twice in the first half, came out stronger after the interval but were dealt a fatal blow when Serbia international Tadic crowned his sensational display by hammering into the top corner in the 62nd minute.
Substitute Marco Asensio gave Madrid a glimmer of hope by striking back but it was quickly extinguished by a breathtaking free kick from Lasse Schone, condemning Real to a fourth consecutive home defeat in all competitions.
Ajax's Lasse Schone scores their fourth goal - Champions League - Round of 16 Second Leg - Real Madrid v Ajax Amsterdam - Santiago Bernabeu, Madrid, Spain - March 5, 2019.
Things got worse for the hosts, who had won the last three Champions League titles in a row, when Nacho was sent off in stoppage time for two bookings.
"I think I have never felt this awful, I do not know how to explain it,” Real defender Dani Carvajal said.
"This week everything has gone against us. Tonight we cannot look for excuses. We have to show our faces and not hide, our season has been a piece of shit.”
Ajax, who have won the trophy four times, most recently in 1995, reached the last eight of Europe’s top competition for the first time since 2003.
"We knew that it was possible to get a result here. We always believed that if we could play our own game we could cause them problems,” said Ajax captain Matthijs de Ligt.
Thirteen-times winners Madrid, who have lifted the trophy in four of the last five years, and had reached at least the semi-finals for the last eight seasons, suffered their earliest elimination since 2010.
It was their joint heaviest ever home defeat in Europe, having also lost by three goals to CSKA Moscow in the group stage in December.
Madrid endured rotten fortune throughout the game, losing Lucas Vazquez and livewire Brazilian teenager Vinicius Junior to injury in the first half.
The night could have gone very differently had Madrid defender Raphael Varane headed under the crossbar instead of against it in the fifth minute, moments before Ziyech scored.
Ajax had Madrid on the ropes after the second goal and should have further increased their advantage, as Neres chipped wide when clean through against Madrid keeper Thibaut Courtois.
The Belgian made some more impressive saves throughout the game but was powerless to stop Tadic’s thunderbolt and was caught out by Schone’s free kick, which looked to be a cross but went straight in, deepening Real’s shame.