Barcelona, without Lionel Messi but already into the last 16, went two goals down in Amsterdam but looked a different side in the second half after Ajax's Joel Veltman was sent off. (Agencies)
Xavi pulled a goal back but Ajax held on to inflict Barca's first defeat this season under new coach Gerardo Martino and the Dutch side now visit AC Milan next month with all to play for.
Milan thrashed Celtic 3-0 away and have eight points to Ajax's seven in Group H after ending the Glasgow side's hopes
Three sides in Group F - Arsenal, Napoli and Borussia Dortmund - all still harbour hopes of reaching the last 16.
Arsenal have 12 points after beating visitors Olympique Marseille 2-0 thanks to a double from England midfielder Jack Wilshere, while Dortmund, last season's losing finalists, join Napoli on nine points after beating the Italians 3-1.
Arsenal travel to Napoli on December 11 while Dortmund play at Marseille, who have yet to earn a point and have now lost eight successive Champions League matches over two seasons.
In Group G, Zenit St Petersburg and Porto still have a chance of joining section winners Atletico Madrid in the last 16. Zenit drew 1-1 at home to the Spaniards to reach six points while Porto have five after a 1-1 draw with Austria Vienna.
Barcelona, without Lionel Messi but already into the last 16, went two goals down in Amsterdam but looked a different side in the second half after Ajax's Joel Veltman was sent off.