Mathias Jänisch struck three minutes from time to give Luxembourg their first win in 2014 FIFA World Cup qualifying Group F.
Martin Paterson's 14th-minute opener was wiped out on the stroke of half-time by Aurélien Joachim. Stefano Bensi and Gareth McAuley then traded second-half goals before Jänisch fired in with three minutes remaining.
The visitors were wobbling when unmarked midfielder Lars Gerson planted a firm header against the crossbar nine minutes in. They swiftly regained their composure, though, as Paterson caressed the ball beyond Jonathan Joubert.
It needed a moment of inspiration to lift Luxembourg spirits and Gerson almost provided it, his sumptuous long-range effort bouncing back off the woodwork. Northern Ireland had been warned, but they could not prevent an equaliser, as Joachim looped a shot over visiting goalkeeper Roy Carroll.
Luc Holtz's team failed to capitalise on an indirect free-kick early in the second half, Bensi slashing wide after being teed up in front of goal. At the other end, William McKay could only disturb the side netting after rounding Joubert and his miss proved even more costly when Bensi made Carroll's net billow with a rasping 20-metre drive.
McAuley thought he had rescued a point when he headed in Steven Davis' corner, but more drama was to come as Jänisch powered in from close range following a goalmouth scramble.