Originally, benefit of clergy was a provision of English law which allowed clergymen to be tried under canon law rather than in the secular courts. It came into being as part of the peace deal between the Crown and the Church after the murder of Archbishop Thomas Becket in 1170.
The term evolved to mean that for some crimes first time offenders of any profession could see their sentences reduced. In theory, they had to be literate, but the test of literacy was always Psalm 51 (O God, have mercy upon me) which could be memorised by the illiterate. The Psalm became known as the neck verse, because knowing it could save one's neck.
The literacy test was abolished in 1706, but the provision remained in force until 1827.
Heathcliff's crime was, according to Nelly, too heinous to qualify.