Objective: To investigate the war crimes committed by psychiatrists during the German Nazi regime in the twentieth century and better understand the moral arguments used to justify them. Method: This article provides a historical review of the crimes committed by psychiatrists in Nazi Germany and ethical analysis from the perspectives of consequentialism and deontology. Results: Nazi psychiatrists oversaw the death of more than 200,000 people with mental illnesses and inflicted harm on many more. Consequentialist reasoning may have been used to justify these atrocities. Deontological reasoning proved impervious to exploitation by the Nazi regime, but without codification it was too easily abandoned and thus failed to protect patients. Conclusions: A duty-based code of ethics that enshrines universal respect for the humanity, dignity and autonomy of all persons, and condemns the misuse of professional knowledge and skills, may be a safeguard against the future political abuse of psychiatry.