Brown University's expulsion of a student who uttered slurs against blacks, Jews and homosexuals again has raised questions about the legality and desirability of campus codes regulating offensive speech.

The expulsion is believed to be the first by a college under an offensive speech code, which some colleges adopted in recent years after episodes of racial or sexual harassment. The intent of such codes is to discourage students from making racist or discriminatory comments, but critics say the policies flout academic and legal traditions of free speech.

The codes have come under legal attack at public universities, which are bound by the First Amendment, leading to a federal court rejection of a University of Michigan rule and a pending lawsuit against the University of Wisconsin system.

Brown spokesman Mark Nickel said the student violated three sections of a disciplinary code relating to harassment, "alcohol-related behavior" and "unreasonably disruptive" conduct.

Three weeks ago, Vartan Gregorian, president of the private Ivy League school in Providence, R.I., upheld the expulsion that a faculty-student committee recommended last fall. To protect the student's privacy, Nickel said, the university would not identify the student or disclose any details.

The student newspaper, the Brown Daily Herald, has identified the expelled student as Douglas Hann, a junior from Pittsburgh and member of the school's football team. The following account of Hann's infractions was related by Andy Bernstein, a sophomore from Brooklyn whose Daily Herald report was based on interviews with witnesses:

On his 21st birthday last October, Hann was outside a dormitory window when he yelled an obscenity and a racial epithet, apparently to no one in particular. After a white student in the dorm admonished Hann about his loudness, he directed insults at that student, who was displaying an Israeli flag in his dorm room. Hann called that student by an insulting term for a male homosexual and a "{expletive} Jew."

That student gathered some friends, including a black woman, and followed Hann as he left the area. At one point, Hann turned and told the black woman: "My parents own you people."

Hann could not be reached for comment.

Brown's discipline code defines harassment as "the subjection of another person, group or class of persons, to inappropriate, abusive, threatening or demeaning actions, based on race, religion, gender, handicap, ethnicity, national origin or sexual orientation."

Two years ago, a faculty-student committee put Hann on probation for alcohol-related behavior and fighting with a black student, Bernstein said.

The move to expel Hann had faded as a hot issue on campus, at least until news reports published this week, but has been widely supported.

"As best as I can tell, the general sense was that this was 'fighting words.' This was not {protected} expression in any sense," said Jacob Levy, a sophomore from Portsmouth, N.H. He referred to a legal doctrine that holds "fighting words" are not protected by the First Amendment.

"I have no quarrel at all with the verdict," said Philip Bray, a professor emeritus of physics. "I'm proud of the university and the way it was handled." In 1985, Bray chaired a university committee that studied campus tensions affecting minorities and women.

But Bob Purvis, legal director of the National Institute Against Prejudice and Violence, criticized Brown's code and Hann's expulsion. He said the Baltimore-based group, which tracks racial incidents on campuses, recommends colleges take other steps in security, minority recruitment and multicultural education to improve the campus climate.

"If First Amendment standards are applied here, I seriously question whether he should have been subjected to disciplinary proceedings at all," Purvis said. "I think it's undesirable to have a code like that. . . . It invites uneven enforcement. It's hard to tell from that the language that's covered."

Ernest L. Boyer, president of the Carnegie Endowment for the Advancement of Teaching, noted his group recommended against speech codes in a report on campus life released last year. Instead, the report urged colleges to "define high standards of civility and condemn, in the strongest possible terms, any violation of such standards."