Your resignation letter should be short and to the point, and most important it should communicate when you intend to permanently vacate the position. Thank your boss for the opportunity; there’s no need to explain why you’re leaving the position, and you should definitely avoid expressing any dissatisfaction with your boss, the company, or other employees. If you think you were treated unfairly, your resignation letter isn’t the place to say so, nor should you under any circumstances include any negative or threatening language in your letter. Remember, once you put it down in writing, it’s set in stone and can even have legal ramifications down the road.
For more on resignation letters, be sure to read How to Write a Professional Resignation Letter.