The Northern Irishman held the overnight lead at St Andrews, but a disastrous opening spell saw him pegged back.
However, a final flourish pulled the 32-year-old through to end the tournament 22-under-par, two shots in front of second-placed Rory McIlroy.
"I just kept it going, I was struggling a bit at the start today but it's a dream come true," said Hoey.
"I hit two of the best shots of my life on 16 and 17.
"I've been working hard on my swing. I did it in Madeira earlier this year but to do it here playing with Graeme (McDowell) and Louis (Oosthuizen) gives me a lot of confidence. It's all of my dreams come true."
The victory secured Hoey a cheque for £515,000.