Mayor Marion Barry will make his first trip abroad as chief executive of the nation's capital in July to represent the District of Columbia at a summit meeting of African leaders in Monrovia, Liberia. Barry will travel at the federal government's expense.

The mayor also will visit Dakar, Senegal, and Nairobi, Kenya, according to a tentatve schedule. He will be accompanied by his wife Effi - who will pay her own expenses - and by Courtland V. Cox, director of the D.C. Minority Business Opportunity Commission and the Barry administration's in-house expert on African affairs.

The mayor, a former black activist who some - including aides to President Carter - consider a rising star in the ranks of national black politicians, has declined a request to stop in South Africa. That stop was suggested by the International Communication Agency, the federal government's principal overseas information arm.

Spokesman for the ICA, which is paying the expenses of Barry and Cox, said Wednesday that the South African stop was removed from consideration because that country is too distant from the other areas to visit during a planned 14-day trip.

Barry said Wednesday that he had ruled out such a visit anyway because friends advised him it would be "positive propaganda for the South African government, and I certainly don't want to do that."

The central focus of the Barry trip will be the 16th annual summit meeting of the Organization of African Unity, the 49-member group representing black and and Arab-ruled Africa.

The mayor, invited by the host government of Liberia, will not participate in official OAU deliberations. Those members-only sessions are held behind closed doors. Barry will be allowed to attend the opening and closing sessions and some of the attendant social functions.

Aides and advisers to Barry said those sessions should offer Barry a chance to talk to African leaders about problems of education and unemployment in black communities, investment in the District of Columbia and, in the case of Nigeria, oil shipments to the United States.

"As an American of African ancestry, like most other African-Americans, I have an abiding interest in Africa, which is our motherland," Barry said.

The tentative schedule calls for Barry to leave for Dakar on July 12, to leave there for Monrovia on July 16, to go to Nairobi, in East Africa, on July 20 and to return to the United States by July 26.

Barry originally had considered visiting Ghana and Nigeria, but domestic situations in both those West African countries are now considered too fragile for such a visit. Ghana has just held its third national elections in 22 years only 14 days after a military coup that led to the execution of its former ruler. Nigeria is planning to hold elections and return to civilian rule this fall for the first time in 13 years.

Cox said Wednesday he is hoping to add other stops to the itinerary, but he would not say where. Sources close to Barry said one of those stops is likely to be Tanzania, a country Cox has visited often and one many militant blacks have at times considered an ideal post-independence African state.

Barry will visit Africa as part of the American Participation Program, a project that sends various artists, political figures, journalists, professors and others abroad to participate in lectures, seminars and workshops with local officials and citizens in foreign countries.

"He is the mayor of a prominent city. He has long been in political life in the United States and he's a civil rights leaders and that's the main attraction," said ICA Director John E. Reinhardt.

At least two other prominent black politicians in positions similar to Barry - Atlanta Mayor Maynard Jackson and Los Angeles Mayor Thomas Bradley - recently have visited Africa.

Barry visited Tokyo in 1974 and has gone on numerous personal trips to the Caribbean Islands. Former Mayor Walter E. Washington took a two week, eight-nation tour of Africa in 1971 at federal expense

Since taking office less than six months ago, Barry has campaigned for a black mayoral candidate in Philadelphia, spoken at a college graduation in Mississippi, attended a meeting of black mayors in Atlanta and a bankers convention in West Virginia. Today he is scheduled to attend a community housing grand opening in Pittsburg and Saturday will attend a realtors' convention in Hot Springs, Va. Barry also has spent three weeks-ends out of town on personal vacations.