Ex-Mets hothead Lenny Dykstra allegedly held a weapon to an Uber driver’s head in New Jersey — while carrying a stash of drugs that included cocaine, police said Wednesday.

The driver had picked Dykstra, 55, up in Linden — and the former player requested to change his destination, police there said. But the cabby refused.

Dykstra then allegedly pulled out a weapon and threatened to kill the driver, police said, without specifying what kind of weapon.

The driver, a 47-year-old man from Roselle, NJ, got the attention of police by speeding his Uber vehicle into a parking garage near the police station while honking his horn repeatedly. He then drove directly to the police station.

The hack fled the car, leaving Dykstra inside, police said.

Cops searched the car and did not find a weapon — but Dykstra was found in possession of cocaine, marijuana and ecstasy, police said.

He was taken into custody at 3:30 a.m. and charged with making terroristic threats and drug possession.

“He was released on his own recognizance,” Lt. Christopher Guenther told The Post.

Police won’t specify what kind of weapon the Uber driver is alleging Dykstra used because none was recovered, Guenther said.

His next court date is June 8 in Union County Superior Court.

Dykstra’s long rap sheet includes being charged with indecent exposure in LA and admittedly selling valuables from his $18 million mansion in violation of the terms of a bankruptcy agreement.

He played center field for the Mets from 1985 to 1989, then was traded to the Philadelphia Phillies. He played there until 1996.

His leadoff homer in Game 3 of the dramatic 1986 World Series made him an enduring hero to Mets fans, but he has been in and out of jail since his retirement.

His other legal troubles have included a 1991 drunk driving crash and arrest in Pennsylvania, a 1999 sex harassment arrest, a 2011 sex assault allegation by his housekeeper and a 2011 arrest in LA on indecent exposure charges, for allegedly exposing himself to at least six women he met via Craigslist.

He was in the news last year for a Twitter war with Lena Dunham.