Hamilton set a lap of 1 minute, 12.458 seconds with his McLaren at Interlagos, just .055 in front of teammate Jenson Button. Vettel's Red Bull teammate Mark Webber will start third after a lap of 1:12.581, with Vettel behind him following a run of 1:12.760.
Ferrari's Felipe Massa was fifth after clocking 1:12.987, while teammate Alonso only managed a lap of 1:13.253, hurting his chances of overtaking Vettel for the championship. His lap was only good for eighth place, but he later moved up a spot because sixth-place Pastor Maldonado of Williams was penalized 10 grid positions for not stopping for weighing.
Vettel needs to finish fourth or better on Sunday to become F1's youngest three-time champion at age 25. Alonso, also seeking his third title, needs at least a podium finish to have any chance of overcoming a 13-point deficit in the standings.
Vettel said a mistake at the end of the session cost him a chance to start closer to the front, but didn't think the result was "a disaster."
"Maybe it's not the best position that we could've gotten, but still we can be quite happy" he said. "I think there are more people behind us than in front of us. If we were 24th, than that would be disappointing, but I'm happy with fourth and there's plenty of opportunities for tomorrow in terms of tactics."
Hamilton, who won the 2008 championship at Interlagos, will be driving his last race with McLaren before joining Mercedes next season. He is coming off a victory at the United States GP last week, and another triumph in his farewell race with the British team would be extra special.
"I think we put ourselves in a really good position and we are just going to do the best that we can from here, working together as a team," Hamilton said.
McLaren has been strong all weekend and seems set to play a role in the title showdown between Vettel and Alonso. Hamilton led the practice times on Friday and Button did the same earlier Saturday. Vettel was always close behind the McLarens, while Alonso was well behind the pace.
Drivers had faced very warm temperatures during practice but it dropped significantly for qualifying. It started raining about half an hour before the timed session but stopped by the time the cars hit the track. The top teams waited several minutes to avoid the slippery conditions at the tricky 2.8-mile track in South America's biggest city.
Michael Schumacher, preparing for his final race before retiring for the second time and giving way to Hamilton, couldn't do much with his Mercedes and will start 13th.
"I didn't think we had great potential for qualifying, but probably we will have a reasonable car for tomorrow," Schumacher said.
Mexican Sergio Perez, taking over Hamilton's seat at McLaren, will start 12th with his Sauber.
Lotus driver Romain Grosjean was lucky to avoid a serious accident when he ran into the back of Pedro de la Rosa's HRT while trying to make a pass at the front straight. He got off the throttle just enough to avoid a hard collision, but he still made contact and damaged his front wing.
Vettel has been dominant recently, finishing on the podium in the last six races and winning four of them.
A fourth-place finish will be enough on Sunday even if Alonso wins. And if the Ferrari driver is second, Vettel can clinch the title by crossing the line seventh or better. The German driver holds the tiebreaker because he has more wins than Alonso — five to three.
Vettel has a chance to become the first driver to win three titles in a row since Schumacher won five straight from 2000-04. The only other driver to win at least three consecutive titles was Juan Manuel Fangio from 1954-57.
Alonso hasn't won a race since the German GP in July, but he finished on the podium in six of the final seven races, including the last four.
It will be the sixth time since 2005 that the F1 season will be decided at the Brazilian GP. Alonso won both of his titles at Interlagos in 2005 and '06.
Red Bull has won the last three races at the track, with Vettel second to teammate Webber last year.
Schumacher, F1's most successful driver, retired for the first time in 2006. He returned in 2010 with Mercedes, but struggled and managed only one podium finish, at the European GP in July.
Follow Tales Azzoni at http://twitter.com/tazzoni