Giving your company advance notice of your resignation is a common courtesy that helps it to fill the position and avoid productivity gaps. However, your company may not extend the same courtesy to you. If your company fires you after you give your notice, you might have legal options available to you depending on your state employment laws.
If you notified your boss of your intention to leave the company and he fires you after he receives the notice, you typically will not receive pay for the remaining time you would have spent with the company. For example, employees that give the standard two-week's notice work until the end of that two weeks. Otherwise, the employee would experience a two-week gap in pay between the end of their old job and the start of their new job. Termination eliminates that pay cushion.
Breach of Contract
Employment contracts typically contain information about the procedure for termination within the company. If you signed an employment contract that requires advanced notification before leaving the company, you can argue for a breach of contract if your boss fires you based on the notification. For example, your contract might say that you are to be paid for your remaining time with the company; firing you after accepting your resignation violates this pay agreement.
Depending on the employment laws of your state, you might have protection against unexpected termination after you submit your resignation. For example, if your state requires advanced notice of termination or a legitimate reason for ending your employment, your boss cannot fire your for quitting. In some states, you can report the actions of your employer to the U.S. Department of Labor for an investigation. However, if your state is an employment "at-will" state, your company can fire you for no reason at all -- including resignation.
Unemployed workers may only file for unemployment insurance if they were fired from their previous employee. If you intended to resign from your previous company, but your boss fired you during your notice period, you technically did not resign from your company. The unintended consequence of this action is your eligibility for unemployment insurance. This eligibility might be beneficial if you do not have another job lined. Your state's unemployment office will typically call your previous employer to determine if you were fired or not.