It will be the first meeting between the 33-year-old two-time major winner Azarenka and teenager Gauff, after overcoming second-set blunders to dispatch Keys in a tense two-hour 14-minute battle.
Gauff, 18, who earned her spot in Fort Worth a day earlier, rolled past Italian Martina Trevisan 6-0 6-3.
Two other players - Aryna Sabalenka and Daria Kasatkina - also qualified on Thursday, claiming the sixth and seventh spots.
Kasatkina will make her debut in the season finale after winning in San Jose and Granby, while fourth-ranked Sabalenka makes her second trip after reaching the semi-final in Flushing Meadows.
Third-ranked Jessica Pegula of the United States kept her impressive 2022 on track to down former US Open winner Bianca Andreescu 6-4 6-4 in Mexico and will next face compatriot Sloane Stephens, who dispatched France's Caroline Garcia 7-6 (8-6) 7-5.
Pegula, a quarter-finalist at the Australian Open, Roland Garros and US Open this year, looked to be in trouble as the Canadian broke her to love in the second game of the first set but quickly found her form, winning slightly more than 70 per cent of her first-serve points across the entire match.
Elsewhere, Veronika Kudermetova beat Latvian Jelena Ostapenko 6-4 6-4 and will next play either American Danielle Collins or Greek Maria Sakkari in the last eight, while Czech Marie Bouzkova overcame a disastrous start to send off Liudmila Samsonova 0-6 7-5 6-3.
Bouzkova will play either seventh-seeded Kasatkina or Anna Kalinskaya next.