McIlroy holed a 2-foot putt for the victory after Kim missed a 3-footer.
McIlroy had a chance to win in regulation, but the 22-year-old star from Northern Ireland missed an 8-foot birdie putt.
He closed with an even-par 72 to match Kim (69) at 18 under on Lake Malaren's Jack Nicklaus-designed Masters course.
"It's something that I feel like I can still get better at is winning and putting yourself in the position to win when you're not playing your best," McIlroy said.
"Even if it's scrappy golf where you grind it out, you're going to win a lot more tournaments by doing that rather than playing your best golf the whole week. I was very happy I was able to pull this one out."
The $2 million first prize is the richest in golf. The top players, staying in Shanghai another week for the World Golf Championships-HSBC Champions at Sheshan International, also received appearance money and last place paid $25,000. Because the event isn't sanctioned by a major tour, there were no ranking points at stake.
Kim earned $750,000.
"It was an exciting final day and a tough finish for me personally," Kim said. "We had a lot fun out there today."
McIlroy gave up an early three-shot lead, then rallied from a stroke down on the back nine to force the playoff.
Both players drove into the bunker on the first extra hole, then blasted out to set up the deciding putts. The victory was McIlroy's first in three career playoffs.
McIlroy ran into trouble on the opening hole of the day when his ball hit the pin and bounced back into the fringe, leading to a bogey.
"I felt good standing on the first tee obviously with a three-shot lead," McIlroy said. "I thought my second shot was very good. It was just a little unfortunate to hit the pin and ricochet back off the green. To go from three ahead to one ahead after the first hole was obviously not the start I was looking for."
After McIlroy answered with a birdie on No. 7 to retake the lead, he hit his second shot into the water on the difficult par-4 ninth en route to a bogey. But Kim missed a 5-foot par putt to remain a stroke back at the turn.
McIlroy hit into the bunker on the 11th and three-putted for another bogey -- his third of the round -- to give Kim the sole lead.
After hitting into the bunker again and barely salvaging par on the 14th, McIlroy finally got a break on the 15th hole when he made a 5-footer for birdie and Kim missed from the same distance to even it.
McIlroy had a chance to take the lead on 17, but missed a birdie putt by less than inch. Then, on 18, he missed the putt that would have given him the victory.