In one sense, it is a minor miracle that Mr. Ren — nicknamed the Big Cannon for his tendency to air his provocative views — managed to stay out of jail for so long. As chairman of a state-controlled real estate developer, he clashed with city and central government officials, including Mr. Yu. He sued two ministries over payment disputes and cut off the heating supply of a big state-owned bookstore after it repeatedly failed to pay construction fees, according to his autobiography. He prompted one Beijing mayor to declare that a company that sued the government should not exist, he wrote.

He was influenced by free-market economists like Milton Friedman and Friedrich Hayek. He believed government control needed to be checked.

“State power in any country is greedy, so it needs to be subject to public supervision,” he wrote in his autobiography. “Otherwise, the power will be abused and everybody will suffer from it.”

Mr. Ren became an important national voice between 2010 and 2015, when Weibo, China’s equivalent of Twitter, became a public arena where people shared their grievances and debated ideas. Before then, he was widely hated in China because he declared that his job was to build housing for the rich, and he blamed government policies for a lack of affordable housing. As housing prices surged despite government cool-down efforts, people began to see him as honest instead of greedy.

In 2011, near the peak of China’s openness to new ideas, Mr. Ren, an avid reader, started a book club. It drew China’s top entrepreneurs, intellectuals and government officials. Books included Alexis de Tocqueville’s “Democracy in America” and Hannah Arendt’s “The Origins of Totalitarianism.” The events became so popular that people had to apply through a lottery system to join. Some people flew to Beijing from all over the country to attend.

Mr. Ren said his goal was to help China’s young generation develop independent thinking so it would not follow the orders of authority slavishly. The government said no to some topics and speakers, but left it largely alone.

By early 2016, he had nearly 38 million followers on Weibo. But party attitudes toward expression were changing.