The short version
- Talk to the kid - help him understand that what he is doing is not only inappropriate, but also wrong. He truly may not understand that as autism makes a kid incapable of picking up the subtle clues that are intuitive to those without this disability. Sometimes things in writing help kids with autism spectrum disorders (something about seeing things in black and white and the authority of the written word helps them cement the knowledge), so having something like that might help. Be encouraging and positive; expect full understanding (Asperger kids are fully verbal) but check on it by having the kid explain it back, and listen to their replay very carefully and literally - "do not shout racial slurs" does not mean "never use racial slurs, at any volume." A kid with an Autism spectrum disorder is forced to be that literal by the make up of their brain, so go there with them.
- Once the expectation is communicated clearly, expect compliance and apply the same discipline you would if the child did not have Asperger's. If there are further violations, you will need to check to make sure there was not something missed in the understanding of the expectation, but if there is not, if the kid understood fully and still chose to do wrong, as we all sometimes do, you are not doing them any favors by giving them any lesser consequences because of their disability. The allowance is made with the extra communication and teaching, not with lower expectations or discipline measures.
The background
My son has a form of Autism which is worse than Asperger's. At four years old he was diagnosed as severely impaired in speech comprehension and production. He almost did not learn to speak. I still remember the sad look on the psychologist's face when, after several sessions and an examination by a neurologist, she had to inform us of the diagnosis.
Over the following years, we took it upon ourselves to help our son. The books said to let psychologists do the therapy so we could concentrate on being mom and dad. We said NO, no doctor is going to put the love, effort, tears and sweat into helping him that we could put into it. My wife and I did extensive research. She put together a regimen of speech therapy, six sessions a day, half hour each session, every weekday. It took us three weeks to teach him the meaning of "yesterday", "today", and "tomorrow". My wife taught him to read (phonics) before he could even understand what he was reading.
One of the things about Autism spectrum disorders is that the person sees other individuals as things. Because you are out there, you are more like the other things in the room (chair, table, person), than like themselves. You are a thing that produces sound and moves around, so they look at your mouth, not your eyes. In this, Autism resembles (but IS NOT) psychopathic disorders. So we took it as our duty to teach our son to "love others as you love yourself".
As we have worked with him, the doctors and his teachers and others around him have been amazed at the transformation. Today, he is a junior in high-school, being recruited by top universities like MIT, Caltech, Harvard, West-Point. He placed in the top 1% in his PSAT test not only in math, but also in the language parts (reading and writing) and is a straight A student, taking regular classes - well, actually honors and AP classes. He is awkward socially, and gets along better with much older adults or much younger kids. He is respected by his teachers, and he volunteers, tutoring and overseeing activities at a center for disadvantaged youth. The adults who have known him since childhood can hardly believe the progress he has made.
But here is the thing that answers your question. There is behavior that can be labeled a mistake - spilling milk, inadvertently slamming a door on someone's hand. Then there is behavior which is sin like hitting someone on purpose or, most definitely, calling someone a racial slur. A kid like this may need to be taught that this is not funny or friendly and needs to stop. But after being told this ONCE, they totally have the capacity to remember it. And we have the obligation not to tolerate it. For their own good, so they may develop into the men and women that they CAN develop into, into the persons that God means for them to develop into, we must not tolerate such behavior.
I assume your friend has told this young man that this is not acceptable behavior. I would say that is step one. (if the young man was not disabled, I would skip this step and go straight to reporting him to the authorities in the University). I can totally see a kid like this doing something like this as a way to relate, not realizing what they are doing is totally wrong, so do take the trouble to teach them, but once they have been told, expect 100% compliance to what is right. Step two, if the behavior continues, even once more, is to go to the authorities in the University and report it. At the very least, an authority figure (advisor? dean?) besides your friend needs to sit with your friend and the student and make clear that if this happens even one more time, the student will be removed from the class with a failing grade, and that if this happens in any other class, ever again, the student could be suspended for the rest of the semester or even expelled from the university.
As a person like this is confronted hard with negative consequences to their wrong behavior, they learn to treat others as they would want to be treated. You actually are able to rewire their brain to see other people as they see themselves. This will lead to a happier, fuller life for them. Do not fall into the trap of thinking that you are doing them a favor by tolerating their behavior - that is the worst thing you could do for them, leaving them locked in their disconnected world. When we learn to love others as we love ourselves, it is actually we who benefit the most, and kids like this need that lesson as much as any of us.