The Finn, who has struggled to keep pace with the defending four-time champion for much of the season, relished the confines of one of his favorite tracks as he clocked a record lap in one minute and 31.387 seconds, AFP reported.
His late fastest lap lifted him ahead of Hamilton, who aborted his final lap after running wide at Turn Seven, and put a grin back on his face as the Mercedes pair delivered another front row lockout.
It was his second pole this year and the sixth of his career. "Alright guys, good job that," said Bottas, as he controlled his feelings after the session.
"I’m really happy, but it’s only the first step this weekend. It’s a massively long run to Turn One from the start."
Bottas claimed his maiden Formula One victory in Russia last year and showed a clear affinity with the track as Sebastian Vettel of Ferrari, who trails Hamilton by 40 points in the title race, took third.
"I messed up in the last sector," said a downcast Vettel.
"It was at Turn 15 and I think there were one and half or two tenths lost, but not enough.
"It was important to get as close as possible and it should have been closer, but not enough to be a threat."
Vettel said he had reminded Bottas of the start of last year’s race when Bottas, from third, passed both Ferraris to take the lead and win. "I just spoke to him so maybe we can turn that around this time," added Vettel.