Justin Bieber was the victim of a million dollar shakedown by a guy who had the video of the singer telling a racist joke ... sources connected with JB tell TMZ.
Our sources say ... approximately 2 months ago Bieber's reps were contacted by a lawyer representing a guy who worked on one of Bieber's video projects. We're told the guy was in possession of Bieber's personal hard drive, saw the video and swiped it.
We're told the lawyer told Bieber's reps his client would sell the video to the media unless Bieber anted up $1 million. Bieber's reps scoffed, and the lawyer immediately dropped the price to $800K.
Sources say the lawyer kept calling back and finally -- a week ago -- said $500K would keep the tape secret. The lawyer was told he "wasn't even in the ballpark" and was sent packing. The video was released a week later.
We're told Bieber's people wouldn't make the deal because they didn't think the tape was that harmful ... especially because Bieber was 15 years old when he told the racist joke.