The law protects your right to complain about workplace discrimination. If your employer fires you or takes any other adverse employment action against you or people close to you because of this, it is an act of retaliation, which is also against the law.
According to the Equal Employment Opportunity Commission, there are three components to a valid claim of retaliation by your employer.
If an employer tries to punish you in some way for making your complaint, it is an adverse action. This can include wrongful termination but can also involve other actions taken to deter you or your co-workers from making similar complaints even if you do not lose your job. Adverse action can occur after your employment has ended, e.g., giving false information about you to prospective employers. It can also be indirect, affecting members of your family who work at the same company.
Protected activity refers to what you did in response to discriminatory conduct by your employer. It includes opposition and participation. Opposition is any complaint you made about discrimination in your workplace, whether formal or informal. It is still a protected activity even if you complained against discrimination against someone else. Participation refers to your involvement in a proceeding related to employment discrimination, such as taking part in an investigation or acting as a witness.
You have to be able to provide evidence that the protected activity you engaged in prompted the adverse action by your employer. If you can show that the adverse action happened shortly after the protected activity or that co-workers uninvolved in the protected activity receive better treatment, that can serve as evidence. A statement by your employer making the causal connection explicit is stronger evidence, but many employers are careful not to make such a statement.
Even if an investigation of your complaint shows no evidence of discrimination by your employer, your legal protection against retaliation persists.