Li, who had advanced to the quarterfinals three times before at Wimbledon, looked out of sorts for most of the third-round match on Court 1. She blew a set point in the second set.
Leading 3-2 in the third set and with Simon serving, Djokovic lunged for a forehand shot and fell hard to the grass, rolling over and grabbing his upper left arm and grimacing in pain.
But after receiving medical treatment, he recovered to play out the match, breaking Simon's serve in the final game, his seventh break in the match.
"It was a sharp pain," Djokovic said. "It was an awkward fall. I was just hoping there is nothing really bad with the joint. Luckily there is nothing damaged. I could play. Just the muscle was quite sore because of the impact. All in all I'm just glad to get through."
In other men's play, No. 19 Feliciano Lopez of Spain beat Ante Pavic of Croatia 6-4, 7-6 (4) 7-5 in a second-round match and Kevin Anderson beat Fabio Fognini of Italy 4-6, 6-4, 2-6, 6-2, 6-1 to reach the fourth round.
Anderson, who won 10 of the last 11 games, is the first South African to advance to the fourth round at Wimbledon since Wayne Ferreira in 2000. He's reached the fourth round of his last three Grand Slams.
In a second-round match carried over from Thursday due to rain, Santiago Giraldo of Colombia beat No. 30 Marcel Granollers of Spain 4-6, 7-6 (2), 1-6, 6-1, 7-5.
Earlier, French Open finalist Simona Halep and former No. 1 Caroline Wozniacki won their matches after rain delayed the start of play for about 30 minutes.
Halep, who lost the Roland Garros final to Maria Sharapova, advanced with a 6-3, 4-6, 6-4 win over Lesia Tsurenko of Ukraine in a second-round match. Wozniacki moved into the fourth round following a 6-3, 6-0 win over Ana Konjuh of Croatia.
No. 22-seeded Ekaterina Makarova of Russia beat Caroline Garcia of France 7-5, 6-3, and Belinda Bencic of Switzerland defeated Victoria Duval of the United States 6-4, 7-5.
Later Friday, defending champion Andy Murray took a 15-match winning streak at the All England Club into the third round against 27th-seeded Roberto Bautista Agut of Spain.
Murray won six matches in a row at the place to earn a gold medal at the 2012 London Olympics, then seven in a row during Wimbledon last year en route to the title, plus another two so far this week.
For complete Wimbledon coverage, including updated draws and reports from Steve Tignor, head to our tournament page.