Mr. Gui, 55, was put on trial in January on charges of providing intelligence overseas, the Ningbo Intermediate People’s Court said in a brief notice announcing the verdict. It said he had applied to restore his Chinese citizenship in 2018, implying that he would give up his Swedish citizenship, and that he did not wish to appeal the verdict. The details could not be independently verified.

Sweden’s foreign ministry said Mr. Gui remained a citizen of Sweden. It urged China to free him.

“We have consistently made it clear that we demand that Gui Minhai be released so that he can be reunited with his daughter and family,” the ministry said in a statement. “This demand still stands. We also demand access to our citizen so that we can provide the consular support he is entitled to.”

Mr. Gui’s sentence was the latest turn in a murky and long-running effort to clamp down on a market for sometimes salacious books on the Chinese leadership that are published in Hong Kong. Such works could not be published in mainland China, but found a booming market among mainland visitors to Hong Kong, a semiautonomous part of China with strong press freedoms.

Mr. Gui was the co-owner of Mighty Current Media, a Hong Kong imprint that had five employees who were held in the mainland, including one, Lee Bo, who was apparently taken off the streets of Hong Kong. All except Mr. Gui were eventually released after giving confessions that were broadcast by Chinese state media.

Most kept silent, but one, Lam Wing-kee, went public after returning to Hong Kong in 2016. He described lengthy isolation and intimidation in an effort to get him to reveal names of writers and customers. He said his confession was written by the authorities, and he had no choice but to deliver it. He later moved to Taiwan, citing fears of growing Chinese influence and control over Hong Kong.