The heroes of Zhang Wei's novels are powerful, popular and successful—everything his readers dream of being, but doubt they will ever achieve. That has helped to make him one of China's most highly paid writers and a star among the country's self-described losers.

The secret to success for Mr. Zhang and a new wave of online writers and performers is making this underclass of consumers feel good in the virtual world.

Writers...