In hospitals and medical schools as densely populated sites with high risk of coronavirus disease 2019 (COVID-19), it is vital to adjust the teaching and training strategy for medical students to ensure curriculum completion with safety. This article aims to introduce the experience of teaching and training for medical students under the epidemic situation at Department of Surgery, Shanghai Medical College, Fudan University and Zhongshan Hospital. The content includes exploring diversified online teaching models for undergraduate surgery courses and clinical practice, carrying out online graduate education and dissertation plans, and strengthening comprehensive education of medical humanity combined with knowledge of COVID-19 prevention. Through implementation of the above teaching strategies, scheduled learning plans of medical students can be well completed in an orderly, safe and quality-ensured manner. Our experience provides practical solution of medical teaching and could be advisable for other medical colleges and teaching hospitals.