The Soviet Union misplaced the body of a dead African ambassador last week and left his coffin in broiling sun on the tarmac at a Moscow airport for a day instead of flying it to Chad with the delegation that thought it was taking the reamins home for ceremonial burial.

The foulup was aggravated when Aeroflot, the Soviet airline, demanded that $12,000 cash advance be paid to fly the body of Ambassador Baba Hasan and the delegation to Ndjamena, the Chadian capital.

Becaue of a civil war in Chad the Moslem ambassador's family here, consisting of three wives and 11 children, is said to be virtually penniless and other diplomatic delegations were asked to contribute to pay Aeroflot.

Hasan died June 7 of a cerebral hemorrhage in a Soviet hospital. The first flight from Moscow to Ndjamena was last Tuesday via a refueling stop in Lago, Nigeria.

The delegation, which included the envoy's eldest son, took off Tuesday night. But when the plane landed Wednesday in Lagos and officials there checked the cargo, no coffin could be found.

Cables from the upset delegation were then sent to Soviet officials demanding that they locate the reamins of the ambassador, who had served here since July 1977.

The Soviets could not find the body, but a young Chadian diplomat on his own search found the cofffin sitting in the hot summer sun at Sheremetyevo Airport late Wednesday.

On Thursday, an embarrassed Soviet Foreign Ministry official, Leonid Iiyichev, personally apologized to the Chadian charge d'affaires and several other African ambassadors.

"We shall investigate this and punish those guilty," he promised the diplomats.

Husan's body was flown out of Moscow yesterday, after almost the entire African diplomatic corps turned out at the airport in a show off respect and unstated ire over the incident.

Iiyichev made his apology to the Chadian charge and the envoys from Kenya, Cameroon and Togo, who had led a pan-African diplomatic protest to the Soviets about the incident. In an unusual gesture, Iiyichev expressed deepest regret on behalf of the ruling Communist Party.

His apologies seem to have gone some way in healing the bad feelings throughout the African diplomatic community here, a sourse said.

Iiyichev's embarrassment also underlines the fact that the episode could not have come at a worse time for the Kremlin, which has been trying to mend fences with Moslem nations after the invasion of Afghanistan in December.

In addition, Soviet relations with many African nations are extremely sensitive because of the Soviets successful military support of the Angolan Marxists in 1975 and the Ethiopian Marxists in 1977. The presence of so many Soviet military advisers and Cuban troops in both countries has made neighboring states somewhat nervous.

Soviet propaganda also has approved of the Libyan-backed rebels fighting the Chadian government, which has been backed by the French in the civil war.