Rosberg, who secured his 11th pole of the season, has to come first and hope that Hamilton, who leads him by 17 points in the drivers' championship, finishes outside the top two to overtake the Briton and take the Formula One drivers' title.
In a tightly-contested qualifying session, the 29-year-old German produced his best lap of the weekend when he most needed it to outpace championship leading Hamilton by four-tenths of a second.
Brazilian Felipe Massa was fourth in the second Williams car, ahead of Australian Daniel Ricciardo and his outgoing Red Bull team-mate, four-time champion German Sebastian Vettel.
It was Rosberg's 11th pole position of the season and the 14th of his career.
More From This Section
It was also the Mercedes team's record-equalling 18th pole of the year and their 12th front row lockout and eighth in succession.
Mercedes Benz also became the first engine supplier to take every pole position in a season since Ford in 1969.
It was not enough to overhaul Rosberg's time and take pole.
"It was a messy lap from Lewis, which was not expected because he had a very good lap in the second qualifying," said Mercedes team chief Toto Wolff.
"I won't tell them anything anymore. They are in their own little bubble and concentrating on the race. I think we should leave them in peace now to concentrate on tomorrow.