Michael O'Neill's side had taken just one point from a possible nine away from home going into the game and were made to pay for a host of missed chances when Rufat Dadashov fired home at the near post on 58 minutes.
Jonny Evans was then sent off in stoppage time for lashing out at Rauf Aliyev, with their misery compounded when Mahir Shukurov curled home the resultant free-kick with the last kick of the game in the Bakcell Arena.
Prior to that, Azerbaijan goalkeeper Kamran Agayev had to be at his best to deny two Chris Brunt drives as well as a Jamie Ward header, with Northern Ireland looking determined to erase the memories of their 3-2 defeat by minnows Luxembourg last time out.
However, they faded after the break and struggled to create much after Dadashov had opened the scoring, their best chance coming when Martin Paterson struck the angle of post and bar with two minutes left.
O'Neill's team-sheet contained a sizeable surprise, with a 3-5-2 formation on show for the first time in his reign.
Craig Cathcart was added to the usual defensive pairing of Evans and McAuley, while Lee Hodson and Shane Ferguson were asked to play as wing-backs.
A bad back pass from Rasim Ramaldanov in the eighth minutes allowed Paterson to pick up the ball 30 yards from goal but with few options ahead he shot wastefully over the bar.
The visitors quickly grabbed a hold on possession but it took 15 minutes to work the goalkeeper, Brunt with a rasping 25-yard drive after good hold-up play from Paterson.
Paterson and Hodson then linked down the right and when the latter's cross was headed out, Paterson scrapped to win the ball back at the edge of the penalty box.
His flat cross found Ward a couple of yards out in the centre of goal and his header pinged back off the keeper, who could have known little about it.
The frustration had barely subsided when Azerbaijan stretched Northern Ireland on the counter, leaving Vugar Nadirov a wonderful chance that he blasted wide from eight yards.
Azerbaijan went forward again, Cathcart badly misjudging an offside to allow Aliyev a free volley at the far post.
Luckily for the Blackpool man, Roy Carroll was alert enough to pull off a fine save.
Northern Ireland ended in the ascendance, but when Paterson muscled in behind the defence he dragged his shot wide across goal and the half-finished goalless.
Azerbaijan started the second period with greater energy, hustling in the midfield and pressing up when not in possession.
They might have been rewarded with a goal five minutes in but an errant finish from Dadasov and a marginal offside flag dashed their hopes.
Northern Ireland were becoming disjointed and soon picked up the first booking of the match, Norwood lunging at Aliyev and earning a suspension for Tuesday's game in Israel.
The resulting free-kick was parried by Carroll but Azerbaijan were ahead by the 58th minute.
Araz Abdullayev and Aliyev combined down the right before the latter slipped in Dadasov, who prodded his shot home first time.
While Northern Ireland's output was lessening by the minute, Shukurov and Abdullayev were starting to control things down the right flank and constantly threatening to fashion a second.
O'Neill looked to his bench to spare his blushes, Niall McGinn on for Hodson, then Billy McKay for Brunt, but there was no significant effect.
Just two minutes remained when Paterson belted the upright but there was much worse to come.First McAuley was received his second yellow of the campaign then Evans went through the back of Aliyev deep in injury-time and was immediately dismissed, with Shukurov adding the final insult by slotting the free-kick into the top corner.
|Azerbaijan||Team Statistics||Northern Ireland|
|0||1st Half Goals||0|
|4||Shots on Target||8|
|4||Shots off Target||11|
|45.2||1st Half Poss.||54.8|
|47.8||2nd Half Poss.||52.2|