Spot the Signs. You may receive this reaction if you're a high_ranking executive or director. These positions can be difficult to replace quickly, so it may be worth it to your company to tempt you to stay rather than letting you go without a fight. It can also happen if you have extremely specialized knowledge that would make it challenging to replace you. On the other hand, if you're in an entry_ or mid_level position, and someone could be hired into your position without much trouble, it's less likely your boss will put up a fight__and a counteroffer.
A Professional Greeting. Your letter should be addressed to your boss. There's a good chance that this letter will merely end up in a file in HR, but it starts with your boss. Assuming this is someone with whom you work reasonably close with on a daily basis, it doesn't have to be super stiff and formal. Specific and professional is the right tone here.