The German was put in the shade by championship leader Hamilton in practice, but stepped up when it mattered to clock a best time of one minute 36.067 seconds in Austin.
Hamilton, who holds a 17-point lead at the top of the drivers' standings, was fastest in all three practice sessions, yet the 2008 champion will have to overhaul his closest rival from second on the grid if he is to make it five consecutive race wins.
Williams duo Valtteri Bottas and Felipe Massa locked out the second row, with Daniel Ricciardo (Red Bull) and Fernando Alonso (Ferrari) completing the top six.
It had been suggested that Red Bull's Sebastian Vettel - who was always going to start the race from the pit lane after using his sixth power unit of the season - would not take part, but his appearance proved fleeting anyway as the defending champion was 17th.
McLaren's Jenson Button, meanwhile, qualified seventh but will start from 12th having incurred a five-place grid penalty for a gearbox change.
After failing to match Hamilton's pace in practice, Rosberg - who suffered glazed brake discs and was then held up before starting a flying lap earlier in the day - had to settle for fourth in Q1, with his team-mate, Massa and Bottas all quicker.
The German improved markedly in Q2, jumping to the top of the field with the weekend's fastest time, before Ricciardo set the early place in the final session.
Rosberg had no trouble eclipsing the Australian's marker, clocking 1:36.067, over a third of a second clear of Hamilton, to set the stage for another fascinating battle on Sunday.