BEIJING — In the risqué world of online erotica in China, “Lady Tianyi,” as her fans called her, was a star. She wrote more than a dozen novels in a genre known as “boys’ love.” With titles like “Absolute Invasion: Kill the Boss,” she built a loyal following of tens of thousands of fans.

Now Tianyi, whose real name is unknown, faces more than a decade in prison, after a court in eastern China found her guilty last month of “producing and selling pornography,” the state-run news media reported over the weekend.

Her punishment captured national attention in recent days, with many Chinese citizens denouncing it as harsh and excessive. In tens of thousands of unusually blunt online comments, many questioned the fairness of the judicial system and said that the government was going too far in its efforts to stop the spread of obscene material.

“Pornography is a normal need of adulthood,” one user wrote on Sina Weibo, a Twitterlike site. “Where’s the crime?”