The match ended abruptly with the disciplinary action that eliminated Medvedev from the tournament, while the contest with Djokovic was still in progress.
According to the Times of India, Medvedev was trailing 5-7, 3-5 at the time of his disqualification.
Sky News reports that the ball struck the spectator in the face. The available information does not specify the person's identity or condition.
According to the Times of India, Djokovic said he was shocked and expressed solidarity with both Medvedev and the injured spectator.
The incident thus decided a semifinal in which Djokovic had been leading on the scoreboard up to that point, and which ended without a regular on-court result.
The Times of India also reports that Alex de Minaur reached the final after Hubert Hurkacz withdrew, forced to leave the match because of an injury on the same day.
Medvedev's disqualification and Hurkacz's withdrawal therefore marked two decisive developments on the road to the China Open final, according to information reported by the Times of India.