James Baldwin, 63, the novelist, playwright, poet and essayist who wrote eloquently and angrily about racial injustice and the black experience in 20th century America, died of stomach cancer yesterday at his home at St. Paul de Vence in the South of France.

Baldwin was author of "Go Tell It on the Mountain" and "Giovanni's Room," two largely autobiographical novels; "The Fire Next Time," apocalyptical essays that preceded the 1960s rioting in many of the country's black urban ghettos; and "Blues for Mister Charlie," a play based loosely on a racial killing in Mississippi. His last work was "Harlem Quartet," a novel published this year about life in the 1950s Harlem jazz clubs.

During the 1950s and 1960s, Baldwin, who regularly used blunt racial language, was widely acclaimed as the most eloquent literary spokesman in the black struggle for equality in America, but that was a role he never accepted.

"I am not a spokesman for anyone," he once said. "I speak only for myself . . . . I am a very tight, tense, lean, abnormally ambitious, abnormally intelligent and hungry black cat. I'm not a nigger. I'm a man."

The author of six novels, four plays and dozens of essays and poems, Baldwin was said by critics to have been able to "make one begin to feel what it is really like to have a black skin in a white man's world."

Critic Martin Fagg observed that Baldwin was "especially expert at evoking not merely the brutally overt physical confrontations between black and white, but the subtle unease that lurks beneath all traffic between the colours, distorting the best of intentions on both sides."

An underlying theme in much of Baldwin's writing was that whites as well as blacks were victims of racial injustice and segregation, because the myth of white superiority prevented whites from dealing with their own weaknesses and inadequacies.

"What white people have to do is try to find out in their own hearts why it is necessary to have a nigger in the first place," he told psychologist Kenneth Clark in 1963. " . . . If you think I'm a nigger, it means you need it."

Born and reared in Harlem, Baldwin was the eldest of 10 children of a father who was a factory worker during the week and a Baptist preacher on Sundays, and a mother who worked as a domestic in white people's homes.

He described his father, who died in 1943, as a proud yet bitter man whom the children were rarely happy to see come home. Baldwin wrote in a 1955 autobiographical essay, "Notes of a Native Son," that "we had not known that he was being eaten up by paranoia and the discovery that his cruelty, to our bodies and our minds, had been one of the symptoms of his illness . . . . "

A major part of his father's problem, Baldwin said about 20 years later, was that "he couldn't feed his kids, but I was a kid, and I didn't know that."

Variations on his father's character would appear with some regularity in Baldwin's fiction, as would other people and scenes from Harlem, where he spent the first 17 years of his life.

As the eldest, Baldwin spent much of his childhood taking care of his younger brothers and sisters. He recalled there were many times when he held an infant sibling with one hand and a book in the other, and he read and reread "Uncle Tom's Cabin" and "The Tale of Two Cities."

At 14, he became a preacher in Harlem's Fireside Pentecostal Church, but he quit preaching after three years, and said he eventually came to believe the church was in part responsible for the oppression of blacks in America.

After high school in New York, Baldwin worked in a variety of wartime industries in New Jersey, and waited on tables and washed dishes in Greenwich Village while writing book reviews and magazine articles at night.

In 1948, he went to Paris on a literary fellowship, seeking relief from what he found to be oppressive discrimination against him in the United States, not only because he was black but also because he was a homosexual.

In 1953, "Go Tell It on the Mountain" was published, a novel dealing with a 14-year-old boy's religious conversion, his struggling family and his dreary environment. Three years later Baldwin wrote "Giovanni's Room," a novel about a young American who discovers his homosexuality while living in France and his search for sexual self-acceptance.

While in Paris, Baldwin also wrote his first play, "The Amen Corner," which dealt with a man's search for his self identity. It was first produced at Howard University in Washington in 1954. Richard Coe, drama critic emeritus of The Washington Post, recalled it as a powerful production with rich and engaging dialogue.

But Baldwin was not well known at the time, and the play was forgotten for 10 years after the Howard production. It reappeared in 1964 in a production in Beverly Hills, Calif.

It was not until 1957 that Baldwin returned to the United States. In 1960 he published a collection of essays, "Nobody Knows My Name," dealing with his last months in Europe and his experiences and observations following his return to this country. One was about a much-dreaded trip Baldwin took to the South to witness the early activities of the civil rights movement, and Baldwin was impressed with what he saw. He later attributed his involvement in the civil rights movement to that trip.

During the early 1960s, Baldwin served on the board of the Congress of Racial Equality and acted as an unofficial civil rights adviser to then-Attorney General Robert F. Kennedy.

He wrote a 1962 novel, "Another Country," an account of race and sex in Harlem and Greenwich Village.

Since the assassination of the Rev. Martin Luther King Jr. in 1968, Baldwin had lived much of the time in France, which he found to be "a refuge from the American madness."

He continued to write, but his work of the 1970s and 1980s failed to attract the critical acclaim of his earlier writings.

"Evidence of Things Not Seen," his book based on the slaying of 29 children and young adults in Atlanta in 1979 to 1981, was published last year.

His views on racial matters did not mellow with age. Equal opportunity, he told The Associated Press in a 1983 interview, "meant a handful of niggers in the window . . . . Black people don't believe anything white people say anymore." He said racial integration had been a failure and that King's death was probably in vain.

In 1986, French President Francois Mitterrand made Baldwin a commander in the French Legion of Honor. One other black American, singer Josephine Baker, has received that award.

Baldwin's survivors include his mother, Berdis Baldwin of Alexandria; five sisters, Barbara Jamison and Gloria Karefa-Smart, both of New York City, Ruth Crum of Ossining, N.Y., Elizabeth Dingle of Springfield, and Paula Whaley of Alexandria, and four brothers, Samuel, of Los Angeles, and George, Wilmer and David, all of New York City.