A wild kidnapping was caught on camera in Brooklyn — with surveillance footage showing the attackers shoving the victim into a minivan, while one of them opens fire on the victim’s friend.

The harrowing scene unfolded while the victim and his friend were moving out an apartment near Herkimer Street and Nostrand Avenue in Bedford-Stuyvesant about 3 a.m. Dec. 21, cops said.

The suspects, at least five of them, initially targeted one of the victims, a 28-year-old man, and forced him inside a parked Honda Odyssey.

While doing so, the victim’s 26-year-old friend tried to approach from across the street but was fired at by one of the suspects. The bullet missed its target, police said.

The assailants drove away in the van with the older victim and bound his hands and feet with duct tape and zip ties, cops said.

They then transferred him into another vehicle, a Honda Accord.

Shortly before 5 a.m., the suspects left the victim on the street near Kings Highway and Foster Avenue in East Flatbush and fled with his cell phone, according to police.

Nearby police happened to come across the bound victim and called an ambulance.

He was taken to a nearby hospital for a cut to his head sustained from being pistol-whipped, cops said.