Playing on grass at the Royal Sydney Golf Club, 18-year-old Bernard Tomic gave the home side an early lead when he beat Stanislas Wawrinka 4-6, 6-4, 6-3, 6-3.
Federer then found himself under enormous pressure after losing the first set to a typically dogged Hewitt and going down a break early in the second.
But the world number three dug deep to break back and win the set on a tiebreak before pulling away to win 5-7, 7-6 (7/5), 6-2, 6-3.
Hewitt struggled to hold serve throughout the opener and never looked like breaking Federer until he seized his chance at 5-5, pouncing on loose play from the Swiss legend to take the advantage.
The Australian held his nerve as he served for the first set, taking the lead with two blistering cross-court forehands, then breaking Federer at the start of the second.
But at 3-1 down in the second set Federer finally found his range and gradually took control, taking the set in a tiebreak and then securing dual breaks in the third and fourth.
Federer, who only arrived in Sydney on Wednesday after his US Open semi-final defeat to Novak Djokovic, admitted being tired and off his game on what he described as an "old school" grass court.
"I all of a sudden realised this was much more difficult than I expected," he said.
"I thought it was going to be tough but once on court I was a bit afraid of hitting my shots because of all the bad bounces out on this grass court and I was just very happy to see that I got so much better as the match went on."
Hewitt, who has slipped to 199 in the world after a series of injuries, will be slight favourite against Wawrinka in the reverse pairings after a disappointing display from the Swiss number two.
Wawrinka started well against Tomic, but the young Australian relaxed after the first set, playing the kind of grass court tennis that took him to the Wimbledon quarter-finals this year.
His mix of touch, flat shots and moments of pure power nullified anything the Swiss tried.
Saturday's doubles will see Hewitt and Chris Guccione taking on Federer and Wawrinka.
The winner of the tie progresses to the World Group in 2012 while the loser will play zonal qualifiers in a bid to get back to the top tier competition in 2013.
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional