Kendrick Lamar's parents met while they were teenagers working on Chicago's South Side. In 1984 they moved to Compton to start a family away from the gang warfare. Lamar's dreams of becoming a rapper were set off after his father took him to see Dr. Dre and Tupac shoot the "California Love" video around the corner from their house. Years later, Dre signed Lamar to his Interscope imprint Aftermath after being turned on to a K.Dot mixtape by Eminem's manager and the legendary Hip-Hop producer jumped on two tracks on his debut Good Kid, Mad City album (the other one being "The Recipe"). This song, on which Lamar and his Aftermath boss rep their city via traded verses, was laid down during their initial meeting. Lamar recalled to Q magazine: "I had to write the lyrics to that one on the spot. That was him testing me. Next week he signed me."
Speaking to BBC Radio 1's Annie Mac, Lamar discussed collaborating with his hero. "It came to a point where I had to really snap out of fan mode and become a professional because after we were introduced, he said he liked my music and I said that I'm a fan of his work," he recalled. "Then he said, 'Okay, now write to this, write a full song to this'. Right after I said 'Man, Dr. Dre, you're the greatest' and he was like, 'Yeah man, you're good too, you could be something... alright now write to this beat'. And that beat ended up being the first song I did with him and ended up on my album called 'Compton.'"