This guy is Uber dense.

A bungling career criminal left a handgun in the back of an Uber car — and then showed up to collect the weapon from an undercover cop while carrying a load of heroin in his underwear, a police source said Sunday.

Convicted felon Henry Figueroa though he could retrieve his loaded Smith & Wesson .380 — which he forgot in the car on Feb. 28 — by texting the driver and claiming he was a cop who had lost his service weapon.

According to court papers, he sent a text to the driver the morning after his ride saying that he’d forgot some “stuff” in the back seat during the ride from the East Village to his Harlem apartment.

When the suspicious driver asked his rider for more details, such as a description of the lost items, the 28-year-old Figueroa admitted he was talking about a pistol.

“I’m a police officer and I was wondering if I dropped my side arm,” he texted.

But the driver had already reported the gun to cops, after seeing it on the back seat.

At the behest of NYPD investigators, the driver wrote back to Figueroa, agreeing to meet him and return the missing handgun.

But instead of the driver, an undercover officer headed to the meeting spot, where Figueroa was waiting for his pistol delivery.

He was arrested as he approached the trunk of the car — and his legal problems soon grew beyond just gun possession, according to a police source.

At the station house, officers said they discovered the drug cache in Figueroa’s pants.

Heroin was first unearthed in his pocket, prompting police officers to do a strip search, according to the court papers.

The cops then found a clear bag tucked inside his underwear, which contained 84 smaller, individually wrapped envelopes of heroin, the papers say.

Figueroa was promptly booked on a charge of narcotics possession with intent to distribute, as well as a charge of felon in possession of a firearm.

His rap sheet includes being busted in 2012 for breaking into an ex’s house, punching her mom and stealing a basket of clothes.

He also has raps for marijuana possession, petit larceny, and assault, and did time for firing a gun in a West Virginia nightclub in 2015. He was convicted on charges of wanton endangerment involving a firearm in that case.

Additional reporting by Emily Saul