Muhammad Ali brought President Carter's Olympics boycott campaign to Africa today and immediately ran into a barrage of verbal and diplomatic left hooks that left him wondering about the wisdom of his mission.

Sports officials here said there was little likelihood that Tanzania would support the U.S. sponsored boycott effort aimed at protesting the Soviet invasion of Afghanistan.

Ali himself startled U.S. Embassy officials here by saying that if the Tazanians could show him his mission was bad for Africa, he would cut the trip short and return to the United States.

The retired world heavyweight boxing champion arrived from India on a U.S. government plane. After Tanzania, he was scheduled to visit Kenya, Senegal, Ivory Coast and Liberia.

Tanzania has been treating Ali's visit largely as a sporting event. News of the arrival of Ali, who is extremely popular here, was carried on the sports page of the government-owned newspaper, The Sunday News, under the headline "Here Comes the Greatest." He is being hosted by the minister of youth and culture, Chediel Mgonja, and will be holding discussions only with sports officials.

Tanzanian President Julius Nyerere refused to meet Ali, ostensibly because he is occupied with the state visit of Irish President Patrick Hillery. But coincidentally, Nyerere was at the airport at the same time as Ali, and presumably could have scheduled a brief meeting with the boxer had he wanted to.

But despite the presidential snub, Ali received a widly enthusiastic reception from local fans. As he stepped off the plane, hundreds of supporters broke through a thin police cordon and, amid cheering and hooting, completely surrounded him. Ali characteristically responded by raising a clenched fist.

Once inside the VIP lounge, however, Ali came under some tough questioning from Tanzanian journalists who wanted to know why he was allowing himself to be used in an attempt to draw Africa into a conflict between the United States and Soviet Union.

In the friendly, 45-minute sparring session, Ali intially defended his mission, saying that as a Moslem he could not tolerate the Soviet Union's invasion of a Moslem country such as Afghanistan.But when journalists pointed out that the Soviets provide important material support to African liberation movements, Ali seemed genuinely surprised. "They didn't tell me in America that Russia supports these countries. Maybe I'm being used to do something that's very wrong."

He continued, "You all have given me some questions which are good and are making me look at this thing different. We can put your country on the map and say you converted Muhammad Ali. He came here and turned around after he found out the situation."

While Tanzanian journalists and officials appeared quite taken by Ali's willingness to learn from them, U.S. Embassy officials were visibly nervous. wWhen one official tried to cut short the bizarre press conference, Ali turned to his audience and said, "They want us to stop. But I'm learining. You're teaching me. Look, I'm no traitor to black people. I you can show me something I don't know, I want to be helped. I'm not here to do nothing against Africa. I'm not here to promote no role for America. If I find out I'm wrong I'm going to go back to America and cancel the whole trip."

Several times Ali asked the local press to defend the Soviet invasion of Afghanistan, but none did. Instead, several questioned why Tanzania and other African states should now support the U.S.-backed boycott at the Olympics when, in 1976, the United States did not endorse the African boycott of the Montreal Olympics airmed at protesting New Zealand's athletic ties with South Africa.

Ali responded that he personally had supported the 1976 African boycott. "That was good. If America is making a move I don't agree with I'll challenge it. All I'm saying is that in this particular case we should show the Russians that we don't like what they did."

Asked if he was disappointed that Nyerere would not meet with him, Ali replied, "I didn't know he won't. No one has told me."

Tanzanian officials, outside the sporting circles, are viewing Ali's visit rather coolly for several reasons. First, they see the U.S. dispute with the Soviets, in contrast to the 1976 African protest, as unrelated to the Olympics. "The U.S.S.R.'s action in Afghanistan does not violate the Olympic charter but South Africa's apartheid policies do," one government official said. Tanzania did vote in favor of the recent U.N. resolution condemning the Soviet invasion of Afghanistan.

In addition, Nyerere is said to be somewhat affronted that Carter, for whom he has much respect, would send a boxer to negotiate with African leaders on such a sensitive diplomatic topic. "It's part of the typical American prejudice that all blacks love sports and all blacks can talk to each other," commented one government official. By Ali's own admission he has no diplomatic experience and in today's performance he showed little of the finesse, or even basic grasp of the issues, necessary for delicate political discussions.

Finally, Nyerere has little personal interest in sports and it said to have had no wish to meet the world-famous fighter. "Nyerere doesn't even meet our own top athletes like [ex-mile recorder holder] Filbert Bayi, so why should he take the time to meet Ali?" asked one official.