Still smarting under African criticism of his role as a U.S. presidential envoy trying to win support in black Africa for a boycott of the Moscow Olympics, Muhammad Ali said today he was transforming his trip into a fact-finding mission about African grievances against America.

"I'm not here to take America's whipping," Ali told reporters on his arrival here. "I'm not here to take punishment for America. I'm not here to push nothing on nobody."

But Ali, who arrived here today from Tanzania, said he would carry on with the trip because he wanted to help prevent a nuclear war in which blacks would be "caught in the middle."

The retired world heavyweight boxer champion also disclosed that Soviet President Leonid Brezhnev had sent him a message urging him not to visit Africa on behalf of President Carter's boycott campaign.

"I have been told Russia has taken a Muslim country by force," Ali said, referring to the Soviet intervention in Afghanistan, "and I am a Muslim. This could start a nuclear war and I am on this trip to prevent that."

"There are two bad white men in the world," he said, "the Russian white men and the American white man. They are the two baddest men in the history of the world and if these two white men start fighting, all of us little black folks are going to be caught in the middle."

Kenya, where Ali will spend two days talking with sports and political figures, is one of three black African countries that already have announced support for a boycott of the Summer Olympics in Moscow.

Tanzania, where Ali was unexpectedly jarred by some hostile, anti-American questioning by reporters yesterday, has rejected Carter's boycott plea.

The remaining countries on Ali's itinerary are Nigeria, Liberia and Senegal.

Senegal has announced that its athletes will attend the Moscow Olympics and Nigeria's government has characterized the American-led boycott effort as "immoral" given previous Western oppostion to African-led boycotts over South African issues, Washington Post correspondent Leon Dash reported from Abidjan, Ivory Coast.

Although his reception here was friendlier than in Tanzania, Ali's venture into diplomacy still had his State Department escorts sweating and biting their nails today.

[In Washington, however, spokesman Hodding Carter III expressed confidence in Ali's mission, saying, "The fact that he is continuing the trip with the same message speaks for itself."]

Spokesman Carter said the U.S. Embassy in Dar es Salaam, Tanzania, had called Ali's turbulent visit there "most useful" and reported that "it had positive effects" on the whole.

[Carter suggested that some of the hostile questions put to Ali in Dar es Salaam had been planted by Soviet officials or supporters, but he said he had no evidence that this was the case.]

Yesterday, U.S. Embassy officials in Dar es Salaam tried in embarrassment to end Ali's press conference when, after questioners pointed out U.S. refusal to back past black boycotts aimed at South Africa, the former champion said, "Maybe I'm being used to do something that ain't right."

But today he said he would continue the trip and he told reporters about Brezhnev's effort to dissuade him.

Ali said that after he was contacted by U.S. officials about the assignment while touring India last week, Brezhnev sent him a message through the Soviet Embassy in New Delhi asking him not to accept it, the Associated Press reported. Ali had met Brezhnev during a 1973 Soviet tour.

The message, according to Ali, said there were two sides to the Afghan question, the Soviets had no designs on any other nation's ports or oil and Ali would find the Americans were wrong. After consulting again with U.S. officials, Ali said, he decided to go ahead with the mission.

[State Department spokesman Carter, not mentioning a message from Brezhnev, said the Soviets had made "an active attempt to dissuade Ali from doing this."]

Ali said today that he would turn the trip into a fact-finding mission to gauge black African grievances against the United States and he said he would give Carter the following message:

"What you want the Africans to do is something you didn't do for them" in past boycott campaigns. "It's simple. If you make a move against South Africa, then these people will be glad to aid you.

"You got me on the spot. You get on a big spot and then you send me around the world to take the whipping. You get on a big spot and you send me around the world to handle the criticism. . . .

"I'm not here to take America's whipping. I'm not here to take punishment for America," he said he would tell Carter.

"I'm not here to push nothing on nobody. Do what you want to do" about the Moscow Olympics, he said he would tell black Africa.

Then he added, "It scares me when I think about America starting to push buttons and Russian starting to push buttons and a couple a bombs destroy both countries and in fact the world. That's what I think I'm trying to stop."

Washington Post correspondent Dash added from Abidjan:

Nigeria's government-run radio has characterized the Carter proposal as hypocritical and inconsistent with American positions in the past, particularly over the African boycott of the 1976 Montreal Olympics. At that time, 28 African countries boycotted to protest New Zealand's presence after that country's participation in sports with racially segregated South Africa.

"For many years now," the Nigerian commentary said, "whenever African states tried to withdraw from any international competition because of nations engaging in sporting activities with South Africa," the United States and its Western allies had always argued "against mixing sports and politics." a

The commentary criticized the West as "insensitive to African feelings" and added that "it is immoral for them now to turn around to champion the boycott of the Moscow Olympics."

Sengal's minister of information, Daouda Sow, has announced that Senegal will attend the Moscow Olympics as it did in Montreal, Senegal, Sow said, does not believe in mixing sports and politics.