The doctor–patient relationship (DPR) is essential in the process of medical consultations and treatments. Poor DPR may lead to poor medical outcomes, medical violence against doctors, and a negative perception of the healthcare system. Little is known about how DPR is affected during this novel coronavirus disease 2019 (COVID-19) pandemic. This cross-sectional study aimed to explore the DPR during the COVID-19 pandemic. There were 1,903 participants in China (95% response rate) who were recruited during the pandemic online via convenience and snowball sampling. Several questionnaires were used to evaluate participants' attitudes toward DPR, including the Patient–Doctor Relationship Questionnaire (PDRQ-9), Chinese Wake Forest Physician Trust Scale (C-WFPTS), a survey on medical violence against doctors, factors that affect and improve DPR, and general trust in medical services. Results revealed that DPR improved, and doctor–patient trust increased compared to participants' retrospective attitude before the pandemic. In addition, patients' violence against doctors decreased during the pandemic. Better doctor–patient trust and lower violence toward doctors are related to better DPR. Furthermore, we found that the main factors that could improve DPR include communication between doctors and patients, medical technology and services, and medical knowledge for patients. This study helped to better understand DPR in China, which may contribute to future health policies and medical practices in order to improve DPR and doctor–patient trust.