This article describes the elaboration process of the new Spanish Code of Medical Deontology ap- proved by the General Assembly of the General Council of Medical Colleges of Spain in December 2022. The reasons for updating the deontological rules, the works carried out, the principles followed in the development of the Code and the most relevant new rules are described.