Veracruz state voted in favour of reforms that will criminalise the dissemination of "harmful or malicious" images, video and messages deemed to damage a person's "reputation or self-esteem".
Offenders can be jailed up for to two years.
Jose Kirsch Sanchez, the left-wing congressman who proposed the reforms, said they were intended to protect vulnerable internet users from abuse.
But critics have said the legislation is broad, with local media dubbing it "anti-meme law".
Some suggested local politicians were seeking to prevent themselves from being ridiculed online.
The eastern state's outgoing governor, Miguel Angel Yunes, said he planned to veto the law, which he described as "unconstitutional for violating the freedom of expression of the people of Veracruz".
His successor, governor-elect Cuitlahuac Garcia, also criticised the legislation and said he would ask Veracruz congress to review it when he enters office later this year.
"I find the writing excessive and ambiguous," he said.