There is second meaning "to be wrong". For example, if seller doubles price without reason (sneaky bastard) then "он охренел".
If someone caused car crash but blames you when police had arrived = "да он вообще охренел".
Note that this term means in these cases "to have unmoral/unprincipled state of mind, allowing to do wrong things".
So, there is some link with first meaning "to be astonished". Like 'shocked state of soul'. Two different meanings with similar base in it's core.