The iron it ingested with the soil it swallowed transformed its body and made it harder than diamonds.
It is said that if an ONIX lives for over 100 years, its composition changes to become diamond-like.