It comes after the coronavirus outbreak was linked to wildlife meat, prompting Chinese authorities to ban the trade and consumption of wild animals.
Shenzhen went a step further, extending the ban to dogs and cats. The new law will come into force on 1 May.
Thirty million dogs a year are killed across Asia for meat, says Humane Society International (HSI).
However, the practice of eating dog meat in China is not that common - the majority of Chinese people have never done so and say they don't want to.
"Dogs and cats as pets have established a much closer relationship with humans than all other animals, and banning the consumption of dogs and cats and other pets is a common practice in developed countries and in Hong Kong and Taiwan," the Shenzhen city government said, according to a Reuters report.
Animal advocacy organisation HSI praised the move.
However, at the same time as this ruling, China approved the use of bear bile to treat coronavirus patients.
Bear bile - a digestive fluid drained from living captive bears - has long been used in traditional Chinese medicine.
The active ingredient, ursodeoxycholic acid, is used to dissolve gallstones and treat liver disease. But there is no proof that it is effective against the coronavirus and the process is painful and distressing for the animals
In February, Chinese authorities banned the trade and consumption of wild animals.
The move came after it emerged that a market in Wuhan selling wild animals and wildlife meat could have been the starting point for the outbreak of the new coronavirus, providing the means for the virus to travel from animals to humans.