Cuban President Fidel Castro apparently conducted some Kissinger-style shuttle diplomacy of his own today, seeking to advance a Soviet proposal for a federation of four radical states that could dominate the strategic Red Sea.

Castro left the Ethiopian capital yesterday, ostensibly en route to Tanzania, but he never arrived there. Instead, he returned here briefly today amid persistent reports that he had held talks in Somalia to try to bring about the federation that would also include Ethiopia, South Yemen, and the French Territory of the Afars and Issas when it becomes independent this summer.

Any such move is likely to be strongly opposed by the United States and its allies in the area - Egypt, Sudan and Saudi Arabia - in the unfolding diplomatic battle between the super-powers and their allies to dominate the Red Sea.

Part of the Soviet, Cuban and Ethiopian strategy appears to be aimed at preventing Marxists Somalia from being won over by the moderate Arab camp. The ultimate outcome of such a shift by Somalia would be the ouster from the country of the Soviets in a major reversal of alliances.

Ethiopia and Somalia have been traditional enemies. The government here was the main American ally in the Horn of Africa for 25 years until the leftward turn of its military revolutionary government.

Somalia and Ethiopia have seemed to be on a military collision course over the future of the French Territory. Its port of Djibouti is Ethiopia's main outlet to the sea but its population is predominantly Somali-related.

The Soviet-envisaged federation would consolidate the Communist positions at the mouth of the Red Sea, a vital waterway not only for Arab states further north but for Israel and the superpowers.

At stake is not only the fate of Ethiopia's radical Marxist military government and Sudan's increasingly pro-Western one, but the future of teh substantial Soviet presence in Somalia and South Yemen and of the American one in Ethiopia.

Castro's secretive movements came as the chairman of Ethiopia's ruling military council, Lt. Col. Mengistu Haile Mariam, let it be known that he now supports the Soviet-proposed federation.

Mengistu told the official Cuban newspaper Granma in an interview published Tuesday that he wants to form a "common anti-imperialist front" in the Red Sea region to counter the bloc of conservative and moderate Arab countries that he regards as the main backers of the secessionist movement in Ethiopia's northern Eritrea Province and the principal foreign enemies of his Marxist regime.

A federation such as Mengistu endorsed would be a major diplomatic coup not only for Castro personally but also for the Soviet Union - A "pax Sovietica" in the explosive Horn of Africa, about which there has been much speculation since the Soviets clearly supported the Ethiopian military council under Mengistu in early February.

Saudi Arabia has reportedly offered Somalia an initial sum of $300 million in financial and military assistance to entice Somali President Siad Barre away from the Soviet orbit and into the moderate Arab camp.

The Arab states have apparently launched a major campaign to win over both Somalia and South Yemen. Sudanese President Jaafar Nimeri is currently on a tour of North Yemen, Oman, South reports say there will be summit among him, Barre and South Yemeni leaders in Aden to discuss the possibility of a common Red Sea policy.

Nimeri almost certainly has the strong backing of both Saudi Arabia and Egypt for his "Red Sea mission." Some reports here say that Nimeri is acting on behalf of these two key Arab states to propose that Somalia and South Yemen join the "joint political command" now made up of Sudan, Egypt and Syria.

The effect of such a development, if Somalia and South Yemen agreed, would be to isolate the Ethiopian government and consolidate the hold of the conservative and moderate Arab states over the entire Red Sea region. They already have made clear that they want this sea to become an "Arab lake," a position that Ethiopia rejects as intolerably arrogant and "imperialistic."

Ethiopia itself has 625 miles of coast line along the red Sea and its military rulers assert that the Arabs have no right to discuss who will control the vital waterway without their being consulted. The Ethiopian Red Sea coast, however, lies entirely in Eritrea, where a fierce secessionist struggle is being waged by the Eritrean Liberation Front.

The Eritrean secessionist movement is strongly backed by a broad array of Arab states, from radical Iraq to conservative Saudi Arabia, with only Libya and South Yemen right now supporting the Ethiopian central goveernment in its struggle to hold Eritrea. The Arabs obviously feel that an independent Eritrea would complete their control of the Red Sea.

Ethiopia's radical military rulers charge that there is a conspiracy of the moderate Arab states, with active American support, to amputate, Eritrea from Ethiopia and to wipe out Marxist regimes throughout this region. "We are convinced that imperialist and reactionary forces have decided to smash the Ethiopian revolution," Col. Mengistu said in his interview with Granma.

Whether Castro has made any progress in convincing Somalia to join in a federation and forego its longstanding claims to Ethiopia's Ogaden region is still not clear.

Castro had already visited Libya and South Yemen before going to Somalia and then Ethiopia. He is now taking his African tour into southern Africa, finally arriving in Dar es Salaam, Tanzania late today. It is not know yet where he is going there. (In DHR ES SALAAM Reuter reported, Castro arrived for his five-day official visit to a colorful welcome from tribal dancers and thousands of Tanzanians. His itinerary includes game hunting, a visit to Zanzibar, and talks with President Julius Nyerere, whom he embraced on arrival.)

Castro's real objectives, like his itinerary, seem to be wrapped in mystery. There was no communique at the end of his three-day official visit here to indicate what the two countries may have decided. Journalists were kept in the dark regarding Castro's movements.

The Ethiopian leadership is being just as mysterious as was Castro here. There has been no mention n the local media of Mengistu's proposal for the federation of radical Red Sea states.

The only hint of a changing Ethio-plan attitude toward Somalia has been the abrupt halt in the propaganda attacks, even though Somali-backed insurents continue to pose a major security threat in the disputed Oganden region.

Somalia, too, has toned down its criticism of Ethiopia, apparently at the suggestion of the Soviet Union and Cuba.

A federation would avert a direct Somali-Ethiopian confrontation over the tiny French territory of the Afars and Issas, such as is now widely feared by both Eastern and Western diplomats here.

But it would require a radical shift in Somali policy, obliging the leadership there to curb its nationalistic zeal and virtually abandon its hopes of seeing both the Ogaden and the French Territory incorporated into a "greater Somalia".

Such a federation probably would estrange Somalia from the Arab League - whose other members already view Somalia as the "odd man out." In fact, Somalia leaders recently have been seeking the help of Sudan and Egypt to obtain wider acceptance in the league.

Now, however, it may be forced to choose between its Arab vocation and its Marxist revolutionary one, as well as between the conservative Arab states or the Soviet-and Cuban-backed radical federation with Ethiopia and South Yemen.