Rap music, often scrutinized for its portrayal of violence, misogyny, materialism, and drug use, can serve as an intriguing case study to empirically explore whether art reflects its time. While existing literature has consistently confirmed the prevalence and increasing trend of these themes in rap lyrics, investigations considering the social context during the production of these songs remain scarce. By analyzing lyrical expressions related to physical and street violence, misogyny, money, and drug use in 27,445 underground and mainstream rap singles released in the United States from 1971 to 2016, we observe significant temporal variations in the prevalence of these themes, each following distinct patterns. Importantly, these themes in lyrics are strongly correlated with pertinent social indicators, including the rates of crime, sexual assault, poverty, and DEA arrests, without significant cross-correlations. These findings suggest that music serves as a mirror of the social and economic realities of the time, providing insights into the depiction of deep-seated social problems through art forms.