Tokyo has banned the sale and lease of anime films and manga comics depicting rape, incest and other sex crimes to under-18s.
A bill, introduced by the metropolitan assembly, calls on the industry to self regulate by toning down graphic comics and films on general release.
Publishers and retailers breaking rules face fines up to 300,000 yen (£2,280).
A group of publishers, complaining of censorship, have threatened to boycott March's Tokyo International Anime Fair.
The bill was proposed by conservative governor Shintaro Ishihara who said it was "natural" the legislation had been passed.
"It's the conscience of the Japanese," he said after the vote.
"You cannot possibly show such things to your own children."
An industry group representing publishers and retailers expressed its "strong anger" over the vote which it sees as limiting freedom of expression.
"Artists of manga and anime have widely raised objections while the entire publishing industry has pointed out problems," it said.
Manga comics, popular with both adults and children in Japan, deal with themes including high school romance and literary classics as well as sometimes hardcore and violent pornography.