In China, emergency room residents (EMRs) generally face high working intensity. It is particularly important to arrange the working shifts of EMRs in a scientific way to balance their work and rest time. However, in existing studies, most of the scheduling models are based on the individual doctor or nurse as a unit, less considering the actuality of operation and management of emergency department (ED) in large public hospitals in China. Besides, the depiction of the hard and soft constraints of EMR scheduling in China is insufficient. So in order to obtain the scientific and reasonable scheduling shifts, this paper considers various management rules in a hospital, physicians’ personal preferences, and the time requirements of their personal learning and living and takes the minimum deviation variables from the soft constraints as the objective function to construct a mixed integer programming model with the doctor group as the scheduling unit. The analytic hierarchy process (AHP) is used to determine the weights of deviation variables. Then, IBM ILOG CPLEX 12.8 is used to solve the model. The feasibility and effectiveness of the scheduling method are verified by the actual case from West China Hospital of Sichuan University. The scheduling results can meet the EMRs’ flexible work plans and the preferences of the doctor teams for the shifts and rest days. Compared with the current manual scheduling, the proposed method can greatly improve the efficiency and rationality of shift scheduling. In addition, the proposed scheduling method also provides a reference for EMR scheduling in other China’s high-grade large public hospitals.