Fictional inspiration:  Dr.Dre, Ice Cube, Cuba Gooding Jr. in Boyz n the Hood
Real world inspiration: 
Christopher 'Young Maylay' Bellard

Any fictional character chosen randomly from a John Singleton or a Hughes brothers film can easily be cited as an inspiration for CJ.

But there was a real life West Coast rapper that was the voice of CJ from GTA: San Andreas. Christopher 'Young Maylay' Bellard was working in New York when he was contacted by DJ Pooh. Pooh, who was consulting on the game with Rockstar, reached out to Malay about what shape the music of the game should take.

The conversation took place over speaker phone without Maylay's knowledge and the staff at Rockstar staff heard his voice. Maylay was brought in to audition and after a few weeks decided to cast Maylay for the role of main character of Grand Theft Auto: San AndreasCarl "CJ" Johnson.