Shehu Shagari, the former civilian president of Nigeria whose corruption-plagued government was overthrown in a military coup, was cleared today of any personal involvement in corrupt practices.

A special review panel said that Shagari, 61, who had been under house arrest since his government fell on the last day of 1983, did not know about or benefit from multimillion-dollar kickback schemes carried out by officials in his government.

The panel recommended that the immediate release of Shagari and his vice president, Alex Ekwueme, who also was cleared, be given "urgent consideration" by Nigeria's ruling Military Council.

Shagari is the most celebrated of more than 150 former officials of the deposed civilian government who face corruption charges. The panel that cleared him today was appointed three months ago by the government of Maj. Gen. Ibrahim Babangida, who last August overthrew the military government that had brought down Shagari.

The fate of Shagari and other officials from the government has become a ticklish political problem for the six-month-old Babangida government. Many Nigerians harbor resentment over the rampant corruption that bled this country of millions of dollars' worth of oil earnings during Shagari's four-year rule.

Babangida, at the same time, is trying to unite his country's vast and ethnically split population behind a painful economic recovery program. Harsh punishment of Shagari, a gentle-mannered and devout Moslem from northern Nigeria, would most certainly have angered the predominantly Moslem north.

Today's decision, which the Military Council is expected to endorse, will allow Shagari to go free, while the two-week hearing that preceded it permitted an extraordinary public airing of the government corruption that was commonplace.

Prosecutors presented details of evidence alleging that government officials conspired to collect about $22 million in kickbacks on a $333 million contract with a French-run construction company, Feugerolle Nigeria Ltd.

Justice Samson Uwaifo, head of the review panel, ruled today that Shagari was unaware of the kickbacks. He also rejected a prosecution argument that Shagari should be held legally accountable for offenses of his subordinates.

During the past two years, Shagari had been held in a government house in Lagos without any formal charges placed against him.