The uncertainty in hospital surgeries directly impacts the working hours of operating-room nurses, leading to frequent overtime and affecting their physical and mental health. To ensure the normal operation of the operation room while balancing the working hours of nurses, the Operating-room Nurse Rostering Problem (ONRP) is studied. A mixed-integer programming model for ONRP is established. An improved discrete artificial bee colony algorithm is designed to solve problems of different scales. On one hand, the proposed algorithm demonstrates strong optimization capabilities for most sub-objectives; on the other hand, its solving efficiency is significantly better than that of commercial solvers. The proposed algorithm can provide a high-quality roster for ONRP in a short time.