1. Don't tell off your boss and co-workers, even if you think they deserve it.
When you leave your job, your emotions may be running high, especially if you are leaving on bad terms. You may want to tell your boss or co-workers what you really think of them. Don't do it, even if they truly deserve it. You never know who you will meet down the road and who you may have to work with one day.
2. Don't damage company property or steal something.
You may feel you were mistreated by your employer and you may be really angry. However, vandalism and theft are criminal offenses. Not only will your professional repution be damaged by your actions, you could end up in jail.
3. Don't forget to ask for a reference.
This may sound like an odd thing to consider if you are leaving your job on unfavorable terms. However, you will have to include this job on your resume, so you should try to make sure you get either a good or, at least, a neutral reference. If you've been fired because of some horrible offense, this may be a moot point. However if your parting is due to something less serious, you may be able to ask your boss for a reference, in spite of the fact that "things didn't work out as expected."
4. Don't badmouth your employer or any of your co-workers to your replacement.
First of all, it will only look like sour grapes, so there's nothing to gain here. Second, your successor will figure things out for himself or herself. Third, it may have been bad chemistry, and your co-worker will have a totally different experience than you did.
5. Don't badmouth your employer to a prospective employer when you go on a job interview.
The only person who this will make look bad is you. Your prospective boss will wonder what caused your relationship with your prior employer to sour and will suspect that you could have been at fault.