The 23-year-old from Sydney won out 6-4 4-6 7-5 on Friday in a three-hour, 17-minute epic on Grand Stand Arena in Rome.
Auger-Aliassime, Canada's world No.10, struck 38 winners but Popyrin held his own to rattle back 36.
The Australian qualifier made his decisive move when he clinched the only break of the deciding set in the 11th game with a stunning backhand pass.
Popyrin then held his nerve on his own serve to book a third-round spot against Roman Safiullin, who beat No.22 seed Sebastian Korda in straight sets.
Remarkably, Popyrin – ranked No.77 in the world – also beat Auger-Aliassime in Adelaide in January.
He beat Taylor Fritz at the Australian Open for good measure, so Friday's win moved him to 3-0 against Top 10 opponents this season.
Fellow Aussie Thanasi Kokkinakis was unlucky to run into local hope Jannik Sinner. The Italian was nearly unbeatable on his serve while winning 6-1 6-4.
Sinner won all 16 of his service points in the first set, and 36 of 39 overall with strong home support behind him.
Sinner closed it out in style with a serve out wide and a swinging forehand volley winner into the open court on his second match point.
"I'm happy about my level today," Sinner said. "I felt the ball very well."
Ranked a career-high No.8 this week, Sinner is in the same half of the draw as six-time Rome champion Novak Djokovic, who faced 61st-ranked Tomas Martin Etcheverry in the night session.
Sinner will next play Russian qualifier Alexander Shevchenko, who beat Sebastian Baez 6-3 6-4.
Italian veteran Fabio Fognini celebrated a 6-3 7-6 (8-6) win over Miomir Kecmanovic by bringing his 5-year-old son, Federico, on to the court with him.
Grigor Dimitrov beat Stan Wawrinka 6-4 7-6 (7-3) and will next play Djokovic or Etcheverry; Gregoire Barrere eliminated 11th seed Karen Khachanov 4-6 6-4 7-6 (7-4).
In women's action, top-ranked Iga Swiatek opened her bid for a third straight Rome title with a 6-0 6-0 rout of former French Open finalist Anastasia Pavlyuchenkova – her 12th consecutive win in the Italian capital.
Paula Badosa defeated Ons Jabeur, last year's runner-up, 6-1 6-4, and ninth-seeded Maria Sakkari beat Barbora Strycova 6-1 6-3.
With agencies