Two weeks after his controversial pole success at the Monaco Grand Prix, the German erased all doubts about his raw speed and talent as he drove with precision and pace to secure his first pole in Canada, his second pole in succession and the seventh of his career.
It was his third pole performance this year and came at a track where Hamilton has always shone and previously claimed three poles. It was also the Mercedes team's fourth front row lockout this year.
"I know it's a track where Lewis is really strong," said Rosberg. "I'm very happy it worked out. It has been a fantastic day and through the weekend we have been progressing all the time and I'm in the best position for tomorrow so I am very happy."
Asked how he achieved his success against Hamilton on one of the Briton's favourite tracks, he added: "It's just working at it all the time, looking at the data, working with engineers and trying to understand areas where I can do better. It's just a process and I'm glad it's worked out."
Hamilton said: "Nico did a fantastic job so congratulations to him. It was not a particularly bad lap, it just wasn't the greatest qualifying - sometimes you have a good qualifying, sometimes you have bad one.
"But it's a great to get a one-two for the team and a fantastic performance. Let's hope we can make history tomorrow."
Defending four-time world champion Sebastian Vettel bounced back from an inconsistent weekend to grab third place in his Red Bull car ahead of Valtteri Bottas and his Williams team-mate Felipe Massa.
Daniel Ricciardo was sixth in the second Red Bull ahead of two-time champion Fernando Alonso of Ferrari, Jean-Eric Vergne of Toro Rosso, Jenson Button of McLaren and Kimi Raikkonen in the second Ferrari.
On a much warmer afternoon than Friday, the session began with plenty of early action for the 21 cars involved, Esteban Gutierrez of Sauber having been forced to sit it out after damaging his chassis in a heavy accident in final free practice.
Pastor Maldonado continued his ill luck when he went off and parked his Lotus at Turn Three and he was soon followed by Swedish rookie Marcus Ericsson who hit the barriers on the exit of turn eight, damaging the left rear quarter of his car.
Hamilton topped the opening stint which saw Maldonado, Marussia duo Max Chilton and Jules eliminated along with the Caterham pair of Kamui Kobayashi and Ericsson.
Massa then set the pace in Q2 with Bottas close behind but in a final flurry Rosberg took over at the top before Hamilton snatched it from him by two-tenths in the final seconds as Mercedes improved significantly.
The late drama saw Vettel grab a place in the top-ten shootout, but pushed Nico Hulkenberg and his Force India teammate Sergio Perez out in 11th and 13th places with rookie Kevin Magnussen 12th between them.
This set up a dramatic duel between the two Mercedes men after Bottas had laid down a marker lap to suggest Williams had the pace to beat Red Bull.
On their first runs, Rosberg was quickest by a fraction and, with a lap in 1:14.946, the first man to break through the 1:15 barrier. This ensured a big effort in response from Hamilton in the final action of the hour.