This is false, at least in general usage. It is very common to hear about civil offenses being referred to as illegal behavior.