Background: Moral intelligence in nurses is of particular importance due to the human and moral nature of their job and profession. Moral intelligence can provide a rule for the correct functioning of humans and is considered a predictive factor of behavior. The moral intelligence of nurses refers to their ability to distinguish right from wrong and adhere to ethical principles. Nurses with higher moral intelligence show more commitment to patient safety and adherence to professional protocols and have a more positive attitude toward patient safety. The purpose of this study was to investigate the relationship between moral intelligence and attitude towards patient safety in nurses working at Shahid Sadoughi Teaching Hospital in Yazd in 2023. Methods: The present study was a descriptive-analytical one conducted cross-sectionally in 2023. The statistical population included 237 nurses working in Shahid Sadoughi Teaching Hospital, Yazd, who were selected by stratified random sampling. Two standard questionnaires with a 5-point Likert scale were used to collect data. Data were analyzed by SPSS24 using descriptive statistics, one-way analysis of variance and Pearson's correlation coefficient. Results: The average moral intelligence of the studied nurses was 135.22 ± 22.30, and the average attitude of the nurses towards patient safety was 72.65 ± 17.32, indicating high moral intelligence and an average attitude towards patients safety in nurses in Shahid Sadoughi University. The results of Pearson's correlation coefficient showed that there is a positive and significant correlation between moral intelligence and nurses' attitude towards patient safety (r = 0.19, p = 0.003). Conclusion: Moral intelligence plays a role in predicting nurses' attitude towards patient safety; therefore, it seems that by strengthening the moral intelligence of nurses, their attitude towards patient safety can be influenced. To strengthen the moral intelligence of nurses and improve their attitude towards patient safety, professional ethics training, development of critical thinking skills and creation of ethical organizational culture can be used. Also, holding workshops to discuss ethical issues and support from ethical management can strengthen nurses in making ethical decisions and more responsible behavior in the field of patient safety.