Exclusive

A hip-hop artist who was a close friend of Nipsey Hussle's had at least 6 firearms pointed at him by cops ... who mistakenly thought he was a car thief.

Rapper Hoggy, aka BH, was pulled over Tuesday in Beverly Hills after cops ran the plates of the vehicle he was driving ... and discovered it was a stolen rental car.

Play video content TMZ.com

Video of the crazy incident -- obtained by TMZ -- shows Hoggy standing outside of the car with his hands in the air ... then slowly and carefully backing toward the armed officers. He was then ordered to get on his knees before being detained.

The good news for the rapper ... our law enforcement sources tell us it was determined neither Hoggy nor the person riding in the vehicle with him had anything to do with the car theft.

We're told they were both released without being arrested because they weren't involved in any crime ... but cops kept the car are still trying to get to the bottom of how it turned up stolen.