Home-favourite Nick Kygrios twice came from a set down, and saved two match points, before eventually prevailing 5-7, 6-4, 3-6, 7-6 (7-2), 6-4 against Ugo Humbert.
The Frenchman served for the match in the fourth set but failed to convert sparking extra life into his Australian opponent.
With the home crowd cheering him on, Kyrgios took the momentum and won the match in the fifth set after three hours and 25 minutes on court.
It is the second consecutive year that the Australian has won in the final set but even the charismatic 25-year-old was in astonishment at his comeback: ‘Honestly, I don’t know how I did that. I don’t even know what to say. I am lost for words. That is one of the craziest matches I have ever played.
‘The one thing I probably have on Humbert right now is experience. I’ve had so many experiences and I just had to draw on that, put my head down and just try to make him play.’
Elsewhere, Novak Djokovic was given a thorough test against American youngster Frances Tiafoe and needed four sets and three-and-a-half hours to secure his passage through to round three.
The Serbian dropped his first set of the tournament and was pushed to the limit in the third set before eventually coming through 6-3, 6-7 (2-7), 7-6 (7-3), 6-3 on the Rod Laver Arena.
The win keeps alive Djokovic’s bid for a record-extending ninth Australian Open title.
There were no such troubles for Dominic Thiem who stormed into the third round in just one hour and 39 minutes, defeating Dominik Koepfer 6-4, 6-0, 6-2.
While Alexander Zverev also progressed with little trouble defeating Maxime Cressy in straight-sets.
Diego Schwartzman and Grigor Dimitrov also secured their places into the next round of the tournament with straight sets victories, while Milos Raonic was pushed to four sets before eventually coming through victorious.
In the women’s draw it was business as usual for Serena Williams who wasted no time in dispatching Nina Strojanovic 6-3, 6-0 in just 69 minutes.
Naomi Osaka, Garbine Muguruza and Iga Swiatek also cruised into round three with straight-sets victories.
Second seed Simona Halep had to come from a set down against Australian Ajla Tomljanovic to progress
Petra Kvitova was a big casualty of the second round as the ninth seed lost to the world No 68 Sorana Cirstea in three sets.
The only players left representing Britain in the singles’ draw turned their focus to the doubles on Wednesday.
Cameron Norrie, who defeated Dan Evans in an all-British affair in the men’s singles, partnered up with American Marcos Giron. The duo came up against another British face in Jamie Murray and his Brazilian partner Bruno Soares and were not so fortunate losing in straight sets to the pair.
However, the only woman left representing Britain in the women’s draw, Heather Watson caused a huge upset with her partner Leylah-Annie Fernandez as they defeated the 10th seeds Samantha Stosur and Zhang Shuai in three sets.