The primary purpose of the ANA Code of Ethics is to establish a framework for ethical nursing practice. It provides guidelines that help nurses navigate complex moral dilemmas and make decisions that uphold the dignity, rights, and well-being of their patients.