Al Ajmi struck from a corner just before the break and Oman's defence held firm in the second half to the delight of their fans at Muscat's Sultan Qaboos Sports Complex.
The win took Oman up two places to second with nine points from seven games and one match left away to Jordan while Iraq remain bottom of the table with five points from six matches.
Asian champions Japan, who earlier on Tuesday became the first side to qualify for next year's World Cup in Brazil after a 1-1 draw at home to Australia, lead the group with 14 points.
The top two teams qualify directly for the finals.
"We're not close to Brazil. We're closer than we were a few months ago, but I think we have a chance for third place," said Oman coach Paul Le Guen whose team have played a game more than third-placed Australia and Jordan who both have seven points.
"When you are coach of Oman you have to be realistic. Our league is not professional and we are in contention for third place with one game remaining," added the Frenchman.
On a hot and humid day that necessitated drinks breaks for the players, both goalkeepers had a quiet first 30 minutes as neither Oman nor Iraq created any chances.
Iraq managed two attacks but Ali Adnan's clumsy effort went over the bar while captain Younis Mahmoud got on the end of a long pass inside the box but could not dodge the last defender.
Oman woke up after the half-hour but striker Abdul Aziz Mubarak's spectacular overhead kick from 16 metres was too high.
Iraq responded but the unmarked Alaa Abdul Zahra was unable to profit from a cross into the box as Raed Saleh, who shone in the Oman defence, cleared the ball and Saif Salman's 30-yard strike then narrowly missed the target.
Having opened the scoring in added time at the end of the first half, Oman's Al Ajmi nearly doubled their lead in the 68th minute but his low shot was blocked by goalkeeper Noor Sabri.
Iraq substitute Mustafa Kareem then squandered their last chance when he shot straight at stopper Faiyz Al Rusheidi.
"It was a tough game. We had two good chances during the game but we were unlucky," said Iraq coach Vladimir Petrovic.
"I was surprised as some of the players did not play well. The team normally plays a lot of long balls. We've been working hard to change this but some of the players were not able to adapt. I'm not satisfied with the overall performance," added the Serbian.