The Belarusian was broken as she served for a place in the final, while also wasting five match points on the teenager's serve.
She then left the court for a medical timeout which lasted nine minutes, before later revealing that she was suffering from nerves and needed to clear her head.
"I almost did the choke of the year," Azarenka said in her court-side interview. "Leading 5-3 I had so many chances. I was just a little overwhelmed, knowing I was one step from the final."
The defending champion will now face Li Na, who she has beaten four times in nine previous meetings in Saturday's final.
"Li Na is playing some of her best tennis so it will be a tough match," she added. "I am just really happy to pull through."
The 23-year-old beat Maria Sharapova in last year's final.