The Dutch champions stunned the Catalans by racing into a two-goal lead, and although Xavi pulled a goal back from the spot, the home side held on to claim a famous winTen-man Ajax ended a run of nine straight defeats to Spanish opposition by beating Barcelona 2-1 in Champions League Group H on Tuesday night.
Thulani Serero opened the scoring for the hosts in the 19th minute with a composed finish from six yards out before Danny Hoesen extended Ajax's lead just before the break with a neat piece of skill inside the penalty area.
Barcelona was gifted a way back into the game when Joel Veltman was dismissed for bringing down Neymar inside the penalty area and Xavi scored from the spot but the Liga champions were unable to make the most of their numerical advantage.
The win moves Ajax onto seven points with one game remaining and the club's hopes of progressing to the last 16 rest on beating AC Milan at San Siro, while defeat for the Blaugrana was the club's first of the season and denied coach Gerardo Martino a share of Pep Guardiola's club record of 21 games unbeaten.
Frank de Boer had the luxury of being able to name an unchanged side from Saturday's 3-0 win over Heracles and there was a further boost as Lerin Duarte returned to the squad as a substitute.
The visitors made four changes, with Carles Puyol, Martin Montoya, Alex Song and Xavi all starting for Martino's men.
Despite a confident start, Ajax was lucky to survive a swift Barcelona counterattack in the 14th minute, as Veltman made a crucial block to deny Cesc Fabregas.
It was all one-way traffic for the remainder of the first half, though, and the home side got its reward for continuing to pressurise Barcelona at a high tempo as Serero opened the scoring with his first Champions League goal five minutes later.
The South Africa international ghosted into the penalty area to meet Ricardo van Rhijn's cross from the right and the 23-year-old calmly side-footed the ball past Jose Manuel Pinto.
After Lasse Schone had missed two chances, Ajax finally doubled its lead just before the break through Hoesen. Pinto saved well from Viktor Fischer and Hoesen latched onto the loose ball, lifted it past Puyol and fired into the bottom corner.
The game was turned on its head four minutes after the break as Van Rhijn played a loose pass back to Veltman. Neymar pounced but he was brought down by the defender just inside the area.
The 21-year-old was given his marching orders and Xavi made no mistake from the spot to halve the deficit.
Jasper Cillessen kept the hosts in the game with a good save from Neymar on the hour and a resilient Ajax defence managed to hold on for a vital win.