Djokovic, watched by new coach Boris Becker, flew past against Argentina's Leonardo Mayer 6-0, 6-4, 6-4, extending his Melbourne streak to 23 straight wins. (Agencies)
With temperatures close to 40 Celsius (104 Fahrenheit), Williams also took the fast route with a 63-minute demolition of Serbia's Vesna Dolonc.
"It was tough conditions out there. I think it keeps getting hotter. Every day is really hot," said the 17-time Grand Slam title-winner.
Li, twice a finalist at Melbourne Park, subdued a challenge from Swiss teenager Belinda Bencic, touted as the new Martina Hingis, to make the third round for the fifth year in a row.
Spanish third seed David Ferrer beat France's Adrian Mannarino to progress alongside Tomas Berdych, the world number seven, who downed Kenny De Schepper.
Ice packs and energy drinks remained in high demand after Canada's Frank Dancevic fainted and China's Peng Shuai vomited in extreme temperatures on Tuesday.
After a tournament-record nine withdrawals in the first round, Croatia's Ivan Dodig became the latest casualty when he pulled out with cramp in the fourth set of his match against Damir Dzumhur.
A report said that Dodig thought he might have "died" in the hot conditions, blasting them as unacceptable.
Despite complaints about the heat, which is forecast to remain for another two days, organisers have baulked at halting play, saying humidity is low enough to mitigate any risk.
Djokovic, a previous casualty of the Australian heat after retiring during his 2009 quarter-final, said his switch to a gluten-free diet had helped him cope.
"I've matured and I got physically better and changed a few things in my diet that helps me to maintain the fitness at a high level throughout the whole year," he said.
“Obviously it wasn't always like this. Even today it was as hard for him (Mayer) as it was for me and you have to find that mental edge in the tough moments and overcome the conditions," he said.
Djokovic had been off his clinical best in his first-round match, but he returned to his familiar precision against Mayer, hitting 30 winners to just 11 unforced errors.
Williams also lived up to her destructive reputation against Dolonc as she goes in search of her 18th Grand Slam title, a tally which would match Chris Evert and Martina Navratilova.
"I'm still excited to just be here and be playing in front of this crowd. I'm happy to still be alive (in the tournament)," she said.
Li raced through her first set against the 16-year-old Bencic, but was forced to fight for the second before taking the match 6-0, 7-6 (7/5).
The former French Open champion admitted she was not at her best but said she was glad to make it through and escape the steamy conditions in straight sets. "Every day is different. I cannot say I played 100 percent," Li said. "Of course I cannot play 100 percent every day, but (I played) at least 60, 65 percent," she added.
Ferrer dropped the second set against Mayer but came back to win 7-6 (7/2), 5-7, 6-0, 6-3 in a typically dogged display.
Jeremy Chardy prompted a racquet-smashing fit from Ukraine's Alexandr Dolgopolov when he edged their ultra-tight four-setter, which included three tie-breaks.
Big-serving Polish 20th seed Jerzy Janowicz ousted Spain's Pablo Andujar in four sets, and French ninth seed Richard Gasquet beat Russian veteran Nikolay Davydenko in three.
Djokovic, watched by new coach Boris Becker, flew past against Argentina's Leonardo Mayer 6-0, 6-4, 6-4, extending his Melbourne streak to 23 straight wins.