Arsene Wenger's side suffered defeat in Italy, with Mikel Arteta shown a red card in the second half, but the result still seems the Gunners qualify at the Italian side's expense.
Needing to win by three goals to definitely go through, it took until the 73rd minute for the Italians to get on the scoresheet. Gonzalo Higuain hit a shot on the turn from around 18 yards to send the home fans into raptures, before Mikel Arteta saw red for a second bookable offense.
But news from Marseille was met with cries of despair from the stands, with Kevin Grosskreutz firing Borussia Dortmund to a last-gasp 2-1 victory, which sent the Germans through as winners of Group F.
Jose Callejon added a second for Napoli at the death, but it was too little too late for the Serie A club.
Arsenal goes through as the runner-up and has now qualified from the group stages for 14 consecutive seasons.
Pepe Reina once again missed out for the hosts, but was fit enough for a place among the substitutes, while Aaron Ramsey and Jack Wilshere dropped to the Arsenal bench in favor of Tomas Rosicky and Mathieu Flamini, as Arsene Wenger made two alterations to the side that was held 1-1 by Everton on Sunday.
Napoli applied the early pressure, Goran Pandev forcing Wojciech Szczesny into a save from a tight angle in the ninth minute after receiving the ball from a Dries Mertens cross.
Christian Maggio then found some space down the right seven minutes before the break, but chipped over with Szczesny advancing, before the Pole’s blushes were saved as Higuain nodded wide from a dreadful attempted clearance.
Mesut Ozil unleashed a shot from distance four minutes into the second period, but it bounced well wide of the far post.
Pablo Armero was denied by Szczesny at close range, Callejon dragged a shot wide and Higuain blazed over as Napoli reacted to a raucous home support.
But Higuain, who was linked with a move to Arsenal in the close season, appeared to have sent Napoli through in the 74th minute, turning superbly just inside the penalty area and sending a left-footed effort beyond Szczesny for his first goal against English opposition in the Champions League.
And Napoli received a boost just a couple of minutes later, as Arteta was given his marching orders for a second yellow card, before Callejon chipped a second from close range for Napoli in stoppage time. Unfortunately, the result left the hosts one goal short of qualification as they became the first club to rack up 12 points but not go through to the last 16.Follow GOAL.COM USA on