The nursing code of ethics is a reference and guideline for a nurse in carrying out nursing care. Moral principles that prohibit actions that can worsen the patient's condition are usually called behavior non-maleficence. Nurses' knowledge of a good nursing code of ethics will minimize the occurrence of negligence and reduce the possibility of malpractice. The aim of this research is to determine the relationship between knowledge of the nursing code of ethics and behavior non-maleficence (no harm). This research is a type of quantitative research with an approach cross sectional where the dependent and independent variables are only observed at one time. The sampling technique used is proportionate stratified with recruitment techniques total sampling. The sample in this study amounted to 64 samples. The results of this study showed that knowledge of the nursing code of ethics was related to behavior non-maleficence The level of significance obtained is (P Value = <0.001) which means P value a = 0.05. Therefore, it can be concluded that there is a relationship between knowledge of the nursing code of ethics and behavior of a non-maleficence nurse in the inpatient ward of Sumedang Regional Hospital. Good knowledge of the nursing code of ethics will influence nurse behavior.