Northern Ireland's McIlroy maintained momentum after his third-round 66 by shooting a superb six-under-par 65 to finish on 15 under at TPC Boston and overhaul overnight leader Casey in the process.
Casey, who began the day with a three-shot lead on 15 under, had to settle for second after carding a two-over-par 73.
US PGA Championship winner Jimmy Walker finished third on 12 under after a second successive 70 while Adam Scott ended with three straight birdies to match McIlroy's 65 and take fourth on 11 under.
‘Remember the sabbath day...’: Northern Ireland’s biggest Protestant church voices worries over Sunday football as Linfield gets ready to clash with Portadown
Manx Grand Prix: Michael Dunlop gears up for Classic Superbike victory bid on new Team Classic Suzuki GSX-R750
Organisers hope returning Mid-Antrim 150 will become permanent fixture on Irish road racing calendar again
Paul Doolin's focus shift from firefighting to foundations
Evan McLaughlin's brace seals deserved win for Coleraine
Patrick Reed, who tied for fifth with Fabian Gomez, retained the overall lead in the FedExCup standings.
McIlroy was four over after the first three holes of his first round, but his recovery after that poor start was outstanding.
The world number five's bunker play was brilliant on Monday, while his putting, a cause of frustration in the recent past, was solid.
He got into his stride with a birdie at the second and picked up further shots at the fourth, seventh, eighth and ninth to reach the turn in 31.
Another birdie at the 12th gave him the outright lead for the first time and, although he gave a shot back at the 17th, he finished positively with a four at the par-five 18th.
Casey began badly with bogeys at the second and fifth and could not keep pace. He did birdie the seventh, but missed a short par putt at the 11th and dropped another shot at 14.
He had an eagle putt at the last to force a play-off, but ended up parring the hole.
McIlroy, who shot 19 under for his final 69 holes, told Sky Sports: "From three holes in - four over par - there were a lot of things going through my mind, and one of them was not winning this tournament.
"So 69 holes later - I played some great golf and holed some great putts. I'm just really proud of myself, how I hung in there on the first day and then got some momentum on Saturday. Then I just went with it.
"It's nice to get that first win in the States this year and hopefully I can take this momentum into the next couple of weeks and ultimately the Ryder Cup."
McIlroy is projected to rise 34 places to fourth in the FedExCup standings behind Reed, Jason Day and Dustin Johnson. The top 70 in the standings now move forward to the BMW Championship at Crooked Stick next week.
Olympic champion Justin Rose, who began the day level with McIlroy on nine under, fell away badly after an eight-over-par 79, thanks largely to two triple bogeys on the back nine. He finished in a tie for 57th, but has still done enough to move on to the next event