Carefully.
Seriously, firing your lawyer is a big decision, and it requires some vigilance. As soon as you've made the firing decision, tell your lawyer to stop communications with all parties connected to your legal business.
Write down the reasons for the firing in a closing
If possible, hand-deliver the letter since you'll want to pick up your file while you're there. Keep in mind that under the law of some states, the attorney you fired may be allowed to keep your file until you've paid your bill. If you can't deliver the letter, use certified mail. Make sure you keep a copy of the letter. It could become evidence later if there is a fee dispute.
Line up another attorney before you fire your old one, especially if you're in the middle of a lawsuit. It may be harder than you think to find someone to take your case. You should also be aware that in certain states, firing a lawyer after a suit has been filed usually requires the court's permission. If the case is close to trial, the court may be reluctant to grant permission for dismissal if it will delay the proceedings.