Prosecutors have dropped the criminal case against Tigran Gambaryan so he can receive medical care, a government spokesman said.

Nigerian officials said on Wednesday they were preparing to release Tigran Gambaryan, an American who has been imprisoned there as part a criminal case against the giant cryptocurrency exchange Binance, after prosecutors dropped charges against him of money laundering.

Dele Oyewale, a government spokesman, said Mr. Gambaryan was being released on humanitarian grounds after significant declines in his health. Mr. Gambaryan had malaria and dealt with issues stemming from a herniated disk.

“Tigran Gambaryan’s release is necessary for him to receive urgent medical care outside Nigeria, given his worsening health condition,” Mr. Oyewale said in an interview.

Mr. Gambaryan, a former U.S. law enforcement officer, was working for Binance, the world’s largest cryptocurrency exchange, when he was arrested in Nigeria in February and accused of money laundering and tax evasion as part of a sweeping investigation into the company. He was transferred to Nigeria’s notorious Kuje Prison from a government-owned guesthouse in April.

In a court hearing on Wednesday, Nigerian prosecutors dropped the charges against Mr. Gambaryan, according to a court employee, Ahmad Danyaro.

The hearing was held without any public notice, Mr. Danyaro said.

“Tigran Gambaryan was merely an employee of the cryptocurrency firm and had no involvement in the alleged offenses committed by the company,” R.U. Adaba, a lawyer for Nigeria’s Economic and Financial Crimes Commission, said in an interview after the hearing.

Mr. Gambaryan had traveled to Nigeria to meet with local officials about Binance’s business dealings in the country. Nigerian authorities said Binance had harmed the nation’s economy by allowing users to transfer funds out of the local currency, the naira, causing it to collapse.

Nigeria is in the throes of its worst economic crisis in a generation, and government officials have blamed the turmoil on the rise of cryptocurrencies. The Nigerian government made its allegations against Binance shortly after the company agreed to a $4.3 billion settlement with a group of U.S. regulators that had accused it of facilitating money laundering.

In November, Binance’s founder, Changpeng Zhao, stepped down as chief executive and pleaded guilty to a money laundering violations. He was sentenced in April to four months in prison.