It's a miracle Kevin Porter Jr. wasn't injured during a scary car wreck Sunday night ... cops just released photos from the scene, and his car was mangled.
Cops say the Cleveland Cavaliers player wrecked his Mercedes Benz at around 2 a.m. in Ohio, and when they responded to the scene ... officers claim they found a loaded handgun and what appeared to be weed inside the vehicle.
The 20-year-old NBA player was arrested for improper handling of a firearm, marijuana possession and more.

THE SCENE OF THE CRASH
But, here's the crazy part, cops say Porter Jr.