Dog-killer Zheheng Feng, who slaughtered his girlfriend’s pooch in a fit of rage and dumped it in the garbage chute last year, pled guilty this week to aggravated animal cruelty.

Though at first he claimed he stabbed the little lapdog out of self-defense, he ultimately agreed to a criminal charge, which will carry a 30-day jail sentence.

As a noncitizen on a work visa, Feng also faces deportation to his native China, according to Judge Laura Ward, who indicated that the lenient sentence — termed a “sweetheart deal” by Feng’s lawyer Todd Spodek — was driven by the fact that Feng faces permanent exclusion from the United States.

But not so fast — deporting criminal aliens isn’t the job of local criminal court judges. It’s a federal matter, and typically involves Immigration and Customs Enforcement, which has been banned from operating in the city’s jails since 2014. Under New York City sanctuary law, signed and endlessly praised by Mayor de Blasio, no city agency can detain anyone on behalf of ICE, or provide the feds with information regarding a criminal’s address, crime or date of release, without a warrant. And even then only if the miscreant has been found guilty of a “violent or serious crime” in the past five years.

Surely stabbing a pet to death qualifies. Psychologists and criminologists have long acknowledged that violence against animals is a reliable predictor of violence against people. But aggravated cruelty to animals, though a felony punishable by up to two years in prison, isn’t included on the city’s list of crimes that merit cooperation with federal immigration authorities. As a sanctuary city, New York protects animal abusers from deportation.

Feng’s lawyer says his client will self-deport after his sentence is over. But if he changes his mind, New York will fight to let him stay.

Anyone who has tuned into one of de Blasio’s radio appearances or press conferences has surely heard him tout a list of “170 crimes” that will trigger city cooperation with ICE. “If you’re convicted of these crimes, then we do cooperate,” the mayor told Brian Lehrer in December. “These are serious and violent crimes . . . If someone’s convicted, we do cooperate with ICE.”

True — murderers, arsonists and rapists who are wanted by the feds for removal from the country will be detained by the city upon official request. But dog-killers, insurance and welfare fraudsters and people who are guilty of grand larceny in the first degree all receive sanctuary in New York City.

Feng has volunteered to go home to China as soon as he finishes his time on Rikers, which should only amount to two weeks, though others who committed the same crime have gotten sentences of a year or more. His lawyer promises that Feng is “100 percent leaving,” because his work authorization has been canceled and he has no legal status in the country. But there are lots of people in New York City who have no legal status to be here, and no plans to leave — and some of them have criminal convictions, too.

Suppose Feng decides that he wants to stay in New York after all, and get a job working off the books or with an easily obtainable stolen Social Security number. No immigration agents will be waiting for him when he gets out of jail, and the city is forbidden from alerting ICE as to what he’s up to. Feng could easily take the bus home and resume his life as a New Yorker, just like everyone else.

To add insult to injury, supposing ICE did catch up with Feng and tried to deport him, city taxpayers would be obliged to pay for his defense in immigration court. Owing to a deal struck between de Blasio and former City Council Speaker Melissa Mark-Viverito, the city covers the legal bill for anyone in removal proceedings in area immigration courts.

The mayor wanted to exempt people convicted of crimes on his list of “serious and violent” felonies, while Mark-Viverito wanted everyone, including murderers, to get a free lawyer. In the end, a wealthy donor offered money to make up the difference, though it wouldn’t matter for someone like Feng, as animal abusers aren’t serious enough for a sanctuary city to worry about.

So while Feng has volunteered to leave, that is a matter of his own free choice. As a city that cherishes immigrants, it’s not up to New Yorkers to decide whether or not deportable aliens who kill dogs get to live among us. Our job is only to welcome him back among us, should he decide to stay.

Seth Barron is associate editor of City Journal.