The two were meeting for the third time this year with Stephens previously claiming victory in both Indian Wells and Miami. The American will face 15th seed Elise Mertens in the Round of 16.
Stephens wins first set with precision
It was Stephens who was asking questions on the Azarenka serve right away, holding a break point in the opening game, the Belarusian saving it to post a nervy hold.
She wasn't as fortunate in her next service game as the world number three blasted a forehand to set up another break chance, gifted to her when the former world number one double-faulted to hand Stephens a 2-1 lead.
It was Azarenka's turn to apply some pressure on the Stephens serve, her first break opportunity coming in the sixth game, but a bad backhand miss allowed the American to wriggle free.
Serving at 95% in the opening set, the defending champion held with ease to move out to a 5-3 lead and she finished the set in style, breaking to love when Azarenka netted, the American looking sharp in every area.
Stephens takes final three games to win well-played encounter
Azarenka needed a better start in the second set and she was able to keep up with Stephens early on, posting an opening hold and attaining a break point in the third game, saved on an error by the Belarusian after a gruelling rally.
That proved to be the turning point as Azarenka wasted a 40-15 lead and was summarily broken to give the title holder a 3-1 lead. She was given an unexpected lifeline when Stephens double-faulted on break point to bring the set back to level terms.
Immediate danger awaited the Belarusian as she faced four more break points, but dug deep to hold, the set at 3-3. It was Azarenka's turn to hold multiple break points and she took her chance on the third opportunity to go ahead 4-3.
With the skies looking threatening, a five-minute break was taken to close the roof, changing the momentum of the match as Stephens broke back and held after saving a break point of her own to lead 5-4.
The match was brought to an end when Stephens fired a forehand winner, reeling off the final three games and sending a message of intent to the rest of the field while prevailing in a match played at a very high level.