During the operation of hospitals, various types of waste are generated in the form of liquid, solid, and gaseous substances. Medical waste must be handled correctly and safely to ensure the health and safety of staff and other people in the hospital environment. The management of hospital waste, especially the sorting of medical waste, must have the consistent goal of protecting the population from environmental pollution threats caused by hospitals. Medical waste sorting requires advanced knowledge and attitude of nurses, the purpose of this study is to find out the knowledge of nurses about medical waste sorting and the attitude of nurses about medical waste sorting. The management of medical waste must be handled appropriately and safely to ensure the safety of health professionals and workers and others in the hospital environment. The design of this study was descriptive and quantitative and included 71 nurses as head nurses and team leaders in surgical and inpatient settings. The total sampling technique was 71 nurses. Data collection was done by distributing questionnaires to the respondents. This study showed that 71 respondents with high knowledge sorted medical waste well and 49 (69%) had a good nursing attitude, 47 (66.2%) respondents sorted medical waste well. The analysis showed that a p-value of 0.01 was obtained for the relationship between medical waste sorting knowledge and nurses' attitudes towards medical waste sorting. Most of the nurses had high knowledge and good attitudes about medical waste management. In addition, it was necessary to increase the socialization of dangerous and toxic waste (B3) carried out by the hospital to improve the knowledge and attitudes of nurses in the sorting of medical waste.