The Spirit of Liu Xiaobo.

How Liu Xiaobo died says a lot about modern China and the fears of modern Chinese leaders. The government in Beijing controls a nuclear weapons arsenal and throws its weight around in international affairs. Yet it was afraid to hear the democratic ideas advocated at great cost by a courageous man of conscience.

In 2009, Mr. Liu was sentenced to 11 years in prison, and even after he learned he had liver cancer in May, Chinese authorities refused to let him leave the country for treatment. So one of China’s most famous dissidents died on Thursday under guard in a Chinese hospital at age 61. He was his country’s only Nobel Peace Prize laureate.

As is common in an increasingly repressive China, Mr. Liu was punished not for a crime, but for giving voice to the most basic human yearnings. In 2008, he was a leader in drafting Charter 08, a constitutional reform manifesto that advocated respect for “universal values shared by all humankind,” including human rights, equality, freedom, democracy and the rule of law. The charter endorsed direct elections, judicial independence and an end to Communist Party dominance, and though it was on the internet only briefly before censors pulled it, it garnered 10,000 signatures.

The government accused Mr. Liu of “inciting subversion of state power,” but in fact the life of this multitalented scholar, writer, poet and social commentator was devoted to peaceful political change. During the 1989 pro-democracy demonstrations in Tiananmen Square, he staged a hunger strike, then negotiated a peaceful retreat of student demonstrators as thousands of soldiers stood by with rifles.

Mr. Liu was detained many times after that. Yet when Beijing pressed the Norwegian Nobel Committee not to honor him, the committee wisely awarded Mr. Liu the 2010 Peace Prize in recognition of “his long and nonviolent struggle for fundamental human rights in China.”

There are reasons to question whether the detention prevented him from being diagnosed early enough and from receiving medical treatment that could have extended his life. On Saturday as he weakened, two Western doctors who were allowed to examine him pronounced Mr. Liu fit to travel overseas for care, but still China refused, seeking to control the man and message until the end.

The authorities also ignored dozens of writers and Nobel laureates who signed petitions calling for Mr. Liu’s release. His final days were spent in a hospital under guard, unable to communicate with the outside world. Meanwhile, authorities filmed him lying still in his bed, then released the footage without his permission for propaganda purposes.

Western leaders, perhaps cowed by President Xi Jinping’s obvious distaste for hectoring on human rights, were unacceptably subdued before Mr. Liu’s death, mostly leaving comments about his case to lower-ranking officials. None were more callow than President Trump, who since taking office has shown little interest in human rights while enthusiastically embracing many authoritarian leaders, including Mr. Xi.

Mr. Trump did not raise Mr. Liu’s case when he met Mr. Xi in Germany last week. And within hours of Mr. Liu’s death, Mr. Trump, asked at a news conference in Paris to give his impression of Mr. Xi, heaped praise on him, calling him a “very good man” who “wants to do what’s right for China.” Some American officials, including Nikki Haley, the ambassador to the United Nations, hailed Mr. Liu’s contribution, but Mr. Trump’s words in Paris signaled to Beijing that it need not listen. Regardless of Mr. Trump, other world leaders should join human rights groups in insisting that Beijing release Mr. Liu’s wife, the poet Liu Xia, who has been under police surveillance since 2010, and let her move to the country of her choice.

Mr. Liu’s death is soul-crushing for his supporters, and there are no signs China will open the door to political reform anytime soon. Even so, there is reason to work for a different future. More than 34,000 people, most in China, recently signed an open letter demanding Mr. Liu’s freedom. And many more Chinese today than in 1989 or 2008 are carrying out “small but significant peaceful acts of protest to further human rights protections,” Xiaorong Li, the founder of several human rights groups, wrote in a Times Op-Ed article.

It will now be up to Mr. Liu’s admirers to dedicate themselves to his dream of a modern China that embraces “universal values,” which will outlive the ruthless leaders who sought to crush him but never could.