Azarenka, the Australian Open champion, was given a real battle by the Frenchwoman, who came into the tournament in form having won the WTA tournament in Strasbourg last week.
It was a match of many service breaks, 15 in all, particularly in the opening set, when Cornet was rewarded for some impressive play.
The French crowd sensed an upset but Azarenka, who has never been past the quarter-finals in Paris, responded to level the match.
Cornet took a heavy tumble that left her in tears, but it appeared more shock than any real injury, and the Frenchwoman became increasingly agitated as the match slipped away.
In the decider Azarenka was much the steadier and the Belarusian clinched a 4-6 6-3 6-1 victory in two hours and 22 minutes to advance to a last-16 meeting with either another Frenchwoman, Marion Bartoli, or former champion Francesca Schiavone.
Azarenka was unhappy with both her serving - she hit 10 double faults - and her general play.
She said: "It was a tough match. I don't think I played really the right way or I was playing my best way, taking my chances in the first set. And she definitely took advantage of that and really took chances on the important moments.
"But it was important to turn things around and finally start playing the right way in the second set, because I felt that I was playing very comfortable for her, and she started to make a lot of winners, fight and make a lot of balls.
"I really felt that I left my serve at home. But if I can win with serving like this, that's pretty remarkable."
Meanwhile, 17th seed Sloane Stephens is also through after a tough 6-4 6-7 (5/7) 6-3 victory over New Zealand's Marina Erakovic.