BEIJING — He was starved, pummeled and interrogated for days on end in an ice-cold room where sleeping, sitting or even leaning against a wall were forbidden. One beating left Wang Guanglong, a midlevel official from China’s Fujian Province, partly deaf, according to his later testimony. Suicide, he told relatives and his lawyers afterward, tempted him.

In the end, he said, he took a deal: He signed a confession acknowledging he had accepted $27,000 in bribes, wrongly believing he would be released on bail and able to clear his name of a crime he says he did not commit.

“He did what they told him to do in order to save his own life,” his sister, Wang Xiuyun, said in an interview.

China is in the midst of a scorching campaign against government corruption, one that has netted more than 50 high-ranking officials and tens of thousands of workaday bureaucrats as part of President Xi Jinping’s effort to restore public confidence in the ruling Communist Party. In the first half of this year, prosecutors opened more than 6,000 investigations of party officials, according to government statistics released in July.