Gonzalo Higuain's goal helped gave Napoli a 2-0 win over 10-man Arsenal in their final Champions League Group F game, as the Gunners qualified in second place following a late victory for Borussia Dortmund away to Marseille.
Arsenal needed a point to be sure of seeding for the knockout stage, but will now likely face one of Europe's leading sides such as Barcelona, Bayern Munich, Real Madrid or Paris St Germain in Monday's draw.
Higuain, who was a summer transfer target for Arsenal, slotted home on 73 minutes to finally break Arsenal's determined resistance and after Mikel Arteta was shown a second yellow card, it was always going to be an uphill battle to get back into the tie.
Jose Callejon chipped in a second during stoppage-time, but it was not enough and Rafa Benitez's men must now regroup for the Europa League.
Arsenal, though, should have gone ahead on 23 minutes but club-record signing Mesut Ozil completely missed his kick after the ball dropped to him inside the Napoli penalty area following a fierce drive by Olivier Giroud.
Napoli skipper Cristian Maggio clipped an angled shot over the bar as Szczesny raced out of his area and, as half-time approached, the Poland stopper saw his clearance bounce off Gonzalo Higuain's head and drop just past the post.
Napoli had to up their game in the second half and left-back Pablo Armero blasted straight at the Arsenal keeper when played into the penalty area on 57 minutes.
Two Greenpeace protesters then abseiled down from the roof to unveil a protest banner before the Italians finally went in front when Higuain - a summer transfer target for Arsenal - turned inside the right side of the penalty area and drove a low shot into the corner of the net.
The Gunners were then reduced to 10 men when Mikel Arteta fouled Callejon, which Hungary referee Viktor Kassai deemed enough for a second yellow card.
Callejon clipped in a late second as Arsenal went through in runners-up spot on head-to-head record compared to the Germans.