dirtydog said:No matter how unreasonable his complaint might have been?
If your behaviour breached company standards, then yes, even if you believe the complaint to be unreasonable.
Most companies have fairly strict guidelines as to what is and isn't inappropriate behaviour in the workplace. Most companies are also willing to not enforce them in a draconain fashion provided no-one is being offended. If you do offend someone and they complain (and repeated racist or sexist comments will do that) then the company will investigate, and compare your behaviour against their code of conduct.
There is no reason why racist or sexist comments (or indeed pretty much any other -ist or potentially abusive/offensive comment) should be made at work.
Given that the person in question was given a warning and carried on with unacceptable behaviour, termination would seem entirely appropriate to me. (The situation would change if they went straight for a gross misconduct termination rather than warning first)