A notice posted on the Culture Ministry Web site on Monday said games that promote drug use, obscenities, gambling, or crimes such as rape, vandalism and theft are "against public morality and the nation's fine cultural traditions."
"Such online games promote the glorification of mafia life ... and are a serious threat to the moral standards of society causing vulnerable young people to be adversely affected," the notice said. The ban on the Web sites starts immediately.
No details were given on how the law would be implemented, but the notice called for law enforcement bodies to ensure Web sites adhere to the new law.
China has the world's largest population of Internet users, more than 298 million, and the world's most extensive system of Web monitoring and censorship.
While the government claims the main targets of its Web censorship are pornography, online gambling, and other sites deemed harmful to society, critics say that often acts as cover for detecting and blocking sensitive political content that can be found on sites such as Facebook, YouTube and Twitter, which are all blocked in China.