The 32-year-old Australian is a former world number one, but is now ranked 60th and had not won a tournament in nearly four years, but he comprehensively out-fought the Swiss legend in a 6-1 4-6 6-3 victory.
Hewitt got off to a storming start in the final, losing just one point on his serve during the opening set and breaking Federer three times thanks in large part to some devastating returns.
Federer turned things around in the second set, finding his form on his own serve and attacking Hewitt's second serve effectively to square the match up.
And the Swiss star was in the ascendancy for much of the final set, earning seven break points - but an inspired Hewitt would not be denied in front of his home fans, saving every one of those chances, and grabbing one of just two break points he earned before serving out the match.
It was Hewitt's first victory since he won the German grass court tournament at Halle in 2010. The man he beat that day? None other than Roger Federer.
"I played great obviously at the start, really well," said Hewitt.
"It took Roger a little bit of time to get into the match. Then I just had to fight hard at the start of the third set."
The Aussie veteran was thrilled to have broken his long win drought, but said that he had never considered walking away from the game.
"Playing the best players in the world and finals of tournaments, always it's exciting. That's why you still play the game," Hewitt added.
"For me, it was motivation enough just to try to get the win out there and obviously win another title. It's been a couple years. So I was just ready for the challenge today.
"It means a lot with the calibre of players here as well in this tournament. It's not an easy tournament to win. I wasn't one of the top four seeds, so I had to win all five matches to get through.
There are pleasing parts and massive positives to take out of it."
Federer refused to be downhearted, despite making 22 unforced errors in the opening set alone - and losing his serve three times in the first set having not lost it previously during the entire tournament.
"[I feel] pretty good, especially having played all the matches I have here now with the doubles in particular," said Federer, who also made the semis of the doubles event alongside Nicolas Mahut.
"It's a good thing. I didn't play great today which is a bit unfortunate. But also Lleyton was the best player I played this week.
"He made it toughest on me. So I have a clear idea what I need to work on, and I have a clear idea where my mind and body is at. I'm very hungry and eager to attack the Australian Open next week."