Having lived up to the billing in the way he beat Lee Westwood in the semi-finals of the Accenture Match Play Championship in Tucson, McIlroy still needed to beat Mahan to take the No.1 spot.
The 22-year-old played the last seven holes of the match in five-under-par with an eagle and three birdies, but that all came after he had three bogeys and a double-bogey in a front-nine 39 and it added up to a 2&1 defeat.
"I just left myself too much to do," said Northern Ireland's US Open champion, whose next chance to dethrone Donald comes in this week's Honda Classic in Florida.
"It wasn't to be, but I didn't have my best game with me this week."
Champion Mahan joked: "Deep down I wanted to postpone that crowning of the No.1 player in the world for Rory.
"He'll get there. He's phenomenal, he's really talented. He'll be No.1 eventually."
Mahan's compatriot Mark Wilson beat Westwood in the third place play-off.
ICE HOCKEY: Braehead Clan's record eight-game winning run was ended at Dundee Stars last night as Drew Bannister's side lost 6-5 in a shootout.
That made it a five-point weekend for the fifth-placed Clan after earlier victories over Sheffield Steelers and Edinburgh Capitals.
BASKETBALL: EJ Harrison and Mychal Green scored 25 points each as Glasgow Rocks tightened their grip on fifth place in the British League with a 101-88 victory at Milton Keynes Lions.
This was Rocks' third consecutive win after they upset Leicester Riders 89-79 in the Midlands on Saturday.