"Sticks and stones may break my bones but words will never harm me" is a fallacy in today's business world. If your words constitute harassment or discrimination, your boss may have a legal obligation to reprimand you. That reprimand may even cost you your job. The best way to avoid losing your position over words, such as racial slurs, is to understand the legal implications of offensive language in the workplace.
Racial slurs can be interpreted as race or color discrimination, which is against the law when that discrimination leads to the victim not being promoted, being fired or laid off, or not receiving the same benefits or treatment as the rest of the employees. Not only can you be held liable for racial discrimination if you do these things, but your employer can be named in a lawsuit as well. The best defense your employer has against your actions is to discipline you.
Closely related to racial discrimination is harassment based on race or color. While discrimination is commonly between a manager and a subordinate, harassment can be one co-worker against another, a customer against an employee or laterally across management as well. While one offensive remark may not constitute harassment, a pattern of racial slurs, derogatory remarks or physical battery, such as noogies, tripping or inappropriate touching, may constitute a pattern of harassment. By law, you employer is obligated to protect all employees from the type of hostile work environment that racial slurs and harassment can create. Your employer is well within his rights to fire you for abusing the rights of others.
Often racial slurs are made in jest and you don't mean to offend anyone. Your goal is to make the people laugh. Unfortunately, your sincerity does not make a difference. If the jokes could be found offensive by the average person and are based on making a race or class of people look bad, you could face disciplinary actions and a possible lawsuit.
Even if you make a racial slur in your private life and it gets back to your employer, your job may be in jeopardy. The majority of workers are at-will employees. At-will employees can be fired at any time and for any reason. If your employer feels your behavior is a poor reflection on the company and may cost him customers, he can exercise his right to fire you as an at-will employee.