The Belarussian had to block out an often blatantly hostile crowd, sit through two lengthy timeouts for Li's injuries and bide her time as a firework display lit up Melbourne's skyline before she finally extinguished her Chinese rival's hopes with a 4-6 6-4 6-3 victory.
Li twice needed treatment after heavy falls - the second time blacking out momentarily after banging her head on the court.
Azarenka looked stunned and then relieved at the end of the 160-minute contest when she realised had won her second grand slam title, ensuring she would retain the number one world ranking to boot.
Even in her moment of triumph, however, the lukewarm response of the crowd on Rod Laver Arena was a reminder of the controversy surrounding her semi-final win over Sloane Stephens.
"This one is way more emotional," she said. "It's gonna be extra special for me, for sure ... you're the only one who knows what you've been going through these two weeks.
"So it's definitely an emotional one and it's going to be special."
It was a second loss in a Melbourne Park final in three years for Li but the Chinese had been more concerned about her health after the second fall.
"I was a little bit worried when I was fell down, my head hit the floor and for two seconds I couldn't really see anything. It was totally black," she said.
"So when the doctor and the physio came out on to the court, I sat up, but it took a long time to fully come around ... I could hear this ringing in my ears."
If the 16 service breaks and a high unforced error count - Li had 57 - meant the match was not one for the real purists, there were some fine rallies and it lacked nothing in incident.
Azarenka's controversial medical timeout in her victory over American Stephens - which left the Belarussian fending off allegations of gamesmanship - clearly won her few friends in Melbourne and there was no doubt who was the crowd favourite.
Former French Open champion Li had been roared on to court like a local hopeful and every point she won was greeted with huge applause, even on the many occasions that it derived from a Azarenka error.
Mixed with the traditional Chinese sporting war cry of "jia you", one voice from the crowd shouted: "C'mon Sloane", while another responded to the Belarusian's trademark grunts by shouting: "Quiet please, Azarenka".
"What happened with Sloane, it was a big deal, for sure," Azarenka said referring to the criticism she received for taking a lengthy timeout immediately after blowing five match points against Stephens.
"But I take it as a great learning experience and just try to live the moment and take the best things out of what happened and move forward."
Li double-faulted on her very first serve and was broken immediately but that only set the pattern on both sides of the net for the first set.
The Chinese recovered to dominate the opening stanza, ramping up the forehand that was once her weakness and hitting some blistering winners with her backhand.
Azarenka had raced out to a 3-1 lead in the second set when Li took her first tumble, turning on her left ankle and crashing to the ground.
The Chinese had the joint strapped and came out firing to get back to 4-4 before Azarenka upped her game again and levelled the match up when Li went wide with a forehand.
It was Li's turn to go ahead in the third set and she was 2-1 up when play was called to a halt for 10 minutes for a firework display in honour of Australia Day.
Li took her second fall on the first point after resumption and lay prone on the floor receiving attention.
"Listen it was a real injury!" she said to laughter in her news conference.
"Maybe if I hadn't fallen down, it would have been another story. You never know. But the reality is I fell down, so nothing can change."
Azarenka quickly grabbed what turned out to be the decisive break and dominated the rest of the match, ensuring she would retain her title when another Li forehand sailed long.
"In these kind of matches you always have to take the opportunity of the important moments," Azarenka said. "In the second set, in the third set, that's what I was doing better.
"In the first set, she was really on top of me, I think, she was really going for her shots and making everything happen."
American twins Bob and Mike Bryan later became the most successful men's pair in grand slam history when they won their 13th doubles title.
The 34-year-olds beat the Dutch pairing of Robin Haase and Igor Sijsling 6-3 6-4 to break the record of 12 grand slams they had shared with Australians John Newcombe and Tony Roche.
With two locals in the boys' final for the first time since 1994, the home crowd was guaranteed at least one celebration for Australia Day.
Nick Kyrgios beat Thanasi Kokkinakis 7-6 6-3 to take the honours, while 15-year-old Croatian Ana Konjuh was too good for Czech second seed Katerina Siniakova and took the girls' title with a 6-3 6-4 victory.
- Sports & Recreation