 Use of insanity as a concept dates from 1324 , and its criminal application was used until the late 16th century in an almost identical way . The defence , if successful , either allowed the defendant to return home or led to him being incarcerated until he was granted a royal pardon ; after 1542 , a defendant who became insane prior to the trial could not be tried for any crime , up to and including high treason . During the 18th century the test to determine insanity became extremely narrow , with defendants required to prove that they could not distinguish between good and evil and that they suffered from a mental disease which made them incapable of understanding the consequences of their actions . The current wording comes from the M 'Naghten Rules , based on the trial of Daniel M 'Naghten in 1843 . 
