Stepanek had Djokovic smiling and acknowledging his winners on some points, frustrated him on others with his constant, stay-in-the-point defense, and even had chair umpire Carlos Bernardes grinning with his over-the-shoulder winner to save one match point near the end.
In Friday's last third-round match, fourth-seeded David Ferrer of Spain beat Marcos Baghdatis of Cyprus 6-4, 6-2, 6-3, clinching the 1-hour, 57-minute match with an ace.
Elsewhere, fifth-seeded Tomas Berdych of the Czech Republic beat Austria's Jurgen Melzer 6-3, 6-2, 6-2 and will next play South Africa's Kevin Anderson, who beat No. 22 Fernando Verdasco 4-6, 6-3, 4-6, 7-6 (4), 6-2.
Others advancing included Japan's Kei Nishikori, who will face Ferrer in the fourth round, and No. 8-ranked Janko Tipsarevic, who has a tough next round against No. 10 Nicolas Almagro , a 7-6 (3), 7-6 4), 6-1 winner over No. 24 Jerzy Janowicz.
In other women's matches, Angelique Kerber survived some nervous moments before fending off American teenager Madison Keys 6-2, 7-5 in their third-round match, then got to blow out the candles on a cake to celebrate her 25th birthday.
Local organizers brought a cake onto the court for Kerber immediately after the match and the crowd at Rod Laver Arena sang "Happy Birthday." She blew out the candles and said thank you to the crowd and to the 17-year-old Keys.
Kerber will next play No. 19 Ekaterina Makarova of Russia, who advanced after a tough 6-7 (4), 6-3, 6-4 win over 2007 Wimbledon finalist Marion Bartoli. In the fourth round last year, Makarova beat Serena Williams and was the first of only four women to best the powerful American in 2012. Kerber was the last.
Fourth-seeded Angieszka Radwanska, meanwhile, won her 12th match in a row with a 6-3, 6-1 victory over Britain's Heather Watson.
"I'm extremely happy to be playing my best tennis from the beginning of the year," said Radwanska, who won tournaments in Auckland and Sydney earlier this month.
Radwanska will now meet 2008 French Open champion Ana Ivanovic, who beat Jelena Jankovic 7-5, 6-3 in a matchup featuring two Serbians who were both formerly ranked No. 1.
Sixth-seeded Li Na advanced with a 6-4, 6-1 win over No. 27 Sorana Cirstea of Romania and will next play No. 18 Julia Goerges, who prevented an all-China fourth-round encounter by beating Zheng Jie 6-3, 1-6, 7-5.
On Saturday, Victoria Azarenka and Serena Williams play their third-round matches and the featured night match has second-seeded Roger Federer taking on resurgent Australian Bernard Tomic, who won his first ATP title last week in Sydney after a poor 2012.
Outpatient ROBOTIC HYSTERECTOMY. Trust an experienced Robotic Surgeon.