O'Leary had taken the claim to Fifa following his dismissal in April 2011, one year into a three-year contract.
The League Managers' Association (LMA) said despite having sacked O'Leary, the United Arab Emirates club claimed the Irishman had abandoned his job.
The 55-year-old has been awarded the full sum due under his contract.
"Club officials had openly stated to the media at the relevant time that there had been a dismissal," said an LMA statement.
Al Ahli also argued that Fifa lacked jurisdiction to hear the claim, but football's world governing body rejected both lines of defence.
O'Leary said: "It has taken a long time to deal with this matter but I am pleased that all issues have now been finalised.
"I hope my case provides reassurance to all managers and coaches working all over the world that there is a formal system in place that provides employment protection."
LMA chief executive Richard Bevan added: "We are clearly delighted with the outcome. In addition, the LMA is extremely grateful to the FA for their assistance in initiating the process with Fifa.
"The added significance and wider impact of this process is the proof that Fifa has mechanisms in place which regulate worldwide employment issues.
"It is extremely encouraging to know that the world governing body can provide a means of redress for managers and coaches at all levels seeking to establish their employment rights, wherever in the world they happen to work."
Former Leeds and Aston Villa manager David O'Leary has won a £3.4m compensation claim against Dubai-based club Al Ahli.