Australian Leishman picked up his first PGA Tour Event in five years as he shot a 69 in the final round, to finish on 12 under and see off the challenge of Americans Kevin Kisner and Charley Hoffman, who were a shot further behind.
McIlroy finished on nine-under and looked in a good position to win until he faltered at the death as he pushed for the win.
However, the Northern Irishman is set to move into second place in the world rankings following his performance at Bay Hill and had plenty to smile about afterwards.
"I thought going out today if I could shoot anything in the 60s it would be a good score," McIlroy said after finishing with a closing 69.
"Obviously I was trying to shoot a couple lower than that but overall played well, I'm really pleased with how I went this weekend and can take a lot of positives from it.
"I can't complain too much. It would have been nice to give it a bit of a better go, I had two chances on 17 and 18 there, but hopefully I can get back up on the horse next week and try and get a win at the (WGC-Dell Technologies) Match Play."