By Mark Lamport-Stokes
With McIlroy initially failing to replicate the stunning form he produced earlier in the day on the way to a 3&1 semi-final win over third-ranked Briton Lee Westwood, Mahan took advantage with a seven-birdie display.
Northern Irishman McIlroy, like Mahan appearing in his first Match Play final, would have replaced Britain's Luke Donald as world number one when the rankings are issued on Monday had he claimed his first WGC crown.
"It wasn't the best of starts," McIlroy said greenside. "Six, seven and eight were the turning point - Hunter won three holes in a row there.
"I was trying to claw my way back, but I left myself with too much work to do."
In dazzling afternoon sunshine, both players bogeyed the opening hole, Mahan after duffing a chip from behind the green and McIlroy when he lipped out from four feet.
The next two holes were halved with matching birdies and McIlroy was fortunate not to go one down at the par-four fourth where he had to take a penalty drop after his tee shot ended up in desert scrub.
He bogeyed the hole, as did Mahan who struck his approach into the front left greenside bunker after being perfectly placed off the tee.
Mahan finally broke the deadlock to go one up with a conceded birdie at the sixth where he struck an exquisite tee shot that settled within two feet of the cup.
The American then benefited from a poor matchplay decision by McIlroy at the par-four seventh.
After watching Mahan's approach from 135 yards pitch on and then spin back down the hill below the green, McIlroy followed suit and then failed to reach the green with his chip.
While Mahan bogeyed the hole, he went two up after the Northern Irishman missed a 10-footer to double-bogey.
McIlroy was again in trouble at the par-five eighth, finding a bunker off the tee, failing to reach the green in three and then lipping out with an eight-foot par putt to go three down.
Mahan went four up after nearly holing out from the fairway with a 180-yard approach at the par-four 10th, his ball finishing two feet past the cup for a conceded birdie.
Though McIlroy chipped in to eagle the par-five 11th and also birdied the par-four 14th to trim Mahan's lead to two-up, the American held him off over the next three holes.
(Reporting by Mark Lamport-Stokes; Editing by Gene Cherry)