The diagnosis of moral insanity was primarily used through the best part of the 19th century to define and justify the psychiatric treatment of a particular type of conduct in which the patient seemed otherwise rational but displayed certain inexplicable and undesirable behaviors deemed socially perverse or "unfit." This article traces the history of this highly contested concept, which mirrors a historical arc in which psychiatry emerges as a discipline and stakes territorial claims on defining and regulating moral behavior. As illustration, I focus on the Hinchman Conspiracy Trial of 1849 as a less known case of wrongful confinement that hinged on proving the diagnosis of moral insanity in court. Moral insanity is a case study of the efforts to medicalize human ethical conduct, an effort starkly resisted by both the courts and the public. Some of the legacies of the term are the contemporary use of insanity as a legal defense, and the ability of patients to dispute psychiatric ward confinement orders in court.