If you’re in New Zealand on a work visa that’s dependent on you having a job, and you’re then legitimately dismissed, you’re legally required to leave the country.
However, if you believe you were dismissed unjustifiably, you should get legal help. You should also consider telling Immigration New Zealand – they may grant you a temporary visa or decide to change the conditions on your existing visa to allow you to stay in New Zealand while you take the personal grievance. However, having a legitimate personal grievance is no guarantee that Immigration New Zealand will change your visa or visa conditions to allow you to stay in the country.
Note: If you plan to bring a personal grievance, it’s important that you deal with the issue of your visa early on. If your current visa expires, you’ll then be in New Zealand unlawfully and this will restrict your ability to apply for future visas.
If a migrant employee has been treated particularly poorly by an employer, then Immigration New Zealand may be interested in prosecuting that employer (see the chapter “Starting and leaving a job”, under “Migrants and other vulnerable workers”).