It was not as popular as you might think.
However, while there often were special courts and special laws for nobility, they were not immune to being prosecuted and executed for their crimes.
If an heir to a nobleman kills a nobleman, he would be arrested, tried and executed. And the inheritance would pass to the next heir.