Nigeria's head of state, Lt. Gen. Olusegun Obasanjo, will pay an official visit to the United States next month, the White House announced yesterday.

It will be the first such trip by a Nigerian leader, and it signals a major diplomatic reconciliation between the United States and black Africa's richest and most populous country.

U.S. officials said the Nigerian leader and President Carter were expected to discuss the current situation in southern Africa as well as bilateral economic matters. High on the agenda will be possible expansion of the U.S. ecomomic role in Nigeria'a massive economic development program.

Obasanjo's willingness to seek closer relations with the United States is interpreted as an important break-through for President Carter's Africa policy. Last month Tanzanian President Julius Nyrere became the first African leader to visit the Carter administration, thus ending a long period of cool relations dating back to the Vietnam war.

U.S. Nigerian relations have been burdened by lingering Nigerian unhappiness over the U.S. role in the Nigerian civil war and by the policies of the Nixon and Ford administrations toward southern Africa.

More recently, the two countries were at odds over Angola with Nigeria backing President Agostinho Neto's leftist regime there. Three times Obasanjo's government rejected efforts by Secretary of State Henry Kissinger to visit Lagos, the Nigerian capital, during his African tour last year.

But officials here said that Obasanjo and his aides have been impressed by President Carter's new departure in dealing with the southern Africa problems and by U.S. Ambassador to the United Nations Andrew Young's missions in Africa. Young visited Lagos twice this year.

Nigeria is the United State's second-biggest source of foreign oil, after Saudi Arabia. Last year the United State bought nearly $5 billion worth of Nigerian oil, of 55 per cent of the country's oil production.

Nigeria is also Africa's main importer of U.S. equipment and services, in excess of $700 million annually. It was expected that the Nigerians would increase their purchases of U.S. industrial and agricultural equipment this year to redress the current trade imbalance, which is heavily in Nigeria's favor.

American officials said the Nigerians have expressed interest in U.S. investments in Nigeria's economy. There have also been preliminary discussions about possible U.S. technical assistance in road construction, education and industrial development.

Obasanjo, 39, former chief of staff of the armed forces, became Nigeria's leader 19 months ago following an abortive coup in which the former leader, Murtala Mohammed, was killed. Murtala had seized power from Gen. Yakubu Gowon in July 1975.

Gowon, who visited the United Nations in 1974, had expressed interest in meeting President Nixon. But Nixon, embroiled in the Watergate crisis, rebuffed Gowon's overtures