It was the second pole of Andretti's IndyCar career and he earned it with temperatures reaching 103 degrees at the two-mile track.
Andretti beat Ryan Briscoe by .0032 of a second. The only other pole for Andretti came four years ago at Milwaukee.
Will Power will have the points lead heading into the season-ending race and he qualified third fastest. Power, however, was pushed back to the 13th starting position due to an engine change.
Ryan Hunter-Reay, who is 17 points behind Power, will start 17th.
"It was not a great qualifying run for us, but it's a 500-mile race, so really I'm not that bummed about it," Hunter-Reay said.
Helio Castroneves is 52 points out of the lead and Scott Dixon is 53 points behind. Dixon will start 15th and Castroneves 20th.
This will be the first IndyCar race at Fontana since 2005. It is scheduled to start at 8:45 p.m. ET Saturday.
LGBT community has 'bullied the American people': Bachmann
Attkisson leaves CBS News, reportedly over network's 'liberal bias'