It was Japan's first Asian Cup group-stage defeat in 26 matches and set them on a potential collision course with South Korea in the last 16 in Qatar, assuming they still progress.
Iraq -- ranked 63 in the world to Japan's 17 -- endured a nervous finish after Liverpool's Wataru Endo pulled one back in the third of eight minutes of injury time.
But they held on and now have six points after beating Indonesia 3-1 in their opening match.
They play Vietnam in their final group game on Wednesday.
Four-time champions Japan have three points after beating Vietnam 4-2 in their opener and face Indonesia, also on Wednesday.
Hajime Moriyasu's side went into the game in Doha on the back of a 10-game winning streak in which they scored 43 goals.
But they had no answer for Iraq's power and aggression, backed by the support of almost 40,000 in the crowd.
Japan had a penalty award rightly overturned by VAR in the second half.
Moriyasu's team were again missing injured Brighton winger Kaoru Mitoma, who was not named in the matchday squad.
Takefusa Kubo, who has scored six goals for Real Sociedad this season, started after coming off the bench against Vietnam.
Hussein was one of five changes in the Iraq starting lineup, coming into the side after scoring as a substitute against Indonesia.
The striker wasted little time in getting on the scoresheet again, heading home after Japan goalkeeper Zion Suzuki flapped at a cross.
Japan had made a similarly slow start against Vietnam, conceding two first-half goals before turning things around before the break.
But they found Iraq far tougher and failed to create any clear-cut chances for the rest of the first half.
Instead it was Iraq who scored again in injury time, Hussein holding off Hiroki Ito to nod home from close range.
Japan brought on Takehiro Tomiyasu at the break for the Arsenal defender's first appearance of the tournament.
Japan won a penalty in the 56th minute when Rebin Solaka was adjudged to have tripped Takuma Asano.
But a VAR check revealed the tackle to have been a clean one, and Ritsu Doan was also out of luck when he curled a free kick over the bar less than 10 minutes later.
Substitute Mohanad Ali almost gave Iraq a third goal midway through the second half but his shot rolled agonisingly wide of the post.
Endo gave Japan hope when he pulled one back deep in injury time but it was too late.