Oh God Our Help In Ages Past is performed in a video wish for 2017 by the group of men, mostly in their eighties with a shaky tenor and bass.
Former military rulers Olusegun Obasanjo and Yakubu Gowon, former interim leader Ernest Shonekan and current vice president Yemi Osinbajo are all involved.
The video did not go down well with many Nigerians. One person on Twitter slammed it as a "rogues' gallery" whilst others said they were praying against a situation they were totally responsible for.
Nigeria is a resource-rich country which is, in many places, impoverished by endemic corruption.
After the hymn the leaders acknowledged responsibility for the "mess" of Nigeria.
"In spite of the mess we made of the country, he (God) manages always to rescue us," said Alex Ekwueme, vice president from 1979 until the first of many military coups in 1983.
Ebitu Ukiwe, vice president under a dictatorship in 1984-1985, said: "I am grateful to almighty God for accepting us despite the mess we have made of ourselves and the country."
Africa's largest economy and the continent's second-biggest oil producer is currently in a recession caused by a looted treasury, low oil prices and massive shortages of foreign currency.
The country is also tackling the insurgency of militant Islamist group Boko Haram which is targeting Christians.
There is also ongoing violence between mainly Muslim herders and Christian farmers.