Bala said that since he renounced Islam and declared himself an atheist, he has not only lost the trust of his father and elder brother, but many friends.
"Most of my friends condemn me and tell me I am bound for hell and that in an Islamic state, I would be killed. Blasphemy is a serious thing here," said Bala, who describes himself on his Twitter page as an ex-Muslim.
Northeast Nigeria is in the throes of an insurgency by extremists bent on turning all Nigeria into an Islamic state under Shariah law, though half of Nigeria's 170 million people are Christian. The uprising has killed thousands and increased tensions between Muslims and Christians in a country where adherents of both faiths are passionately religious.
Bala said he wants to leave northern Nigeria but first is trying to reconcile with his family, especially the father, two uncles and older brother who beat him up, drugged him and committed him to the psychiatric ward of Kano city's Aminu Kano Teaching Hospital.
News of his plight came through tweets that he sent on a smuggled telephone from the hospital toilet.
Businessman Bamidele Adeneye, who had been corresponding with Mubarak about humanism through social media before he was committed, saw one of his desperate SOS messages and mobilized help through the (hash)FreeMubarak Twitter campaign and the London-based International Humanist and Ethical Union.
Adeneye said he has also been getting death threats.
"I'm getting calls from people who say 'Where do you live, we are coming to get you.'" But he said he would continue to help Mubarak because, "That man is intelligent, his only sin is being honest about what he believes."
He helped organize help from Kano lawyer Muhammad Bello Shehu, who said he had been preparing to take Bala's case to court when the doctors discharged all patients because of a strike.
"Currently Mubarak has said he wants to reconcile with the family before he leaves and we have had some family meetings, that is ongoing right now, and they appear apologetic, to a certain extent," Shehu said.
Shehu is seeking an independent psychiatric evaluation of Mubarak's health to counter the claims of hospital doctors that he has psychological problems and family claims that he suffered a "personality change" that led to his renunciation of Islam, he said.
Bala's father, Muhammad Bala, did not immediately respond to phone calls and text messages. In a blog, the father describes himself as a journalist and director general of Kano state's Directorate of Societal Reorientation, one of the bodies that enforces Islamic Shariah law.
On Twitter, Bala has described his father as an Islamic leader who "can't afford to have a non-Muslim family member, so he declared me insane."