Jay-Z’s foray into legal matters should come as no surprise. While he ain’t passed the bar, he knows a little bit. Enough that you won’t illegally search his shit.

The rap mogul is said to have spent “tens of thousands” of dollars on bail for protesters who were arrested in Ferguson and Baltimore.

Dream Hampton, a writer and activist who worked with Jay-Z on his 2010 memoir “Decoded,” made the revelations in a series of messages on Twitter that she later deleted but were reproduced by the hip-hop magazine Complex.

“When we needed money for bail for Baltimore protesters, I… hit Jay up, as I had for Ferguson (and he) wired tens of thousands” of dollars within minutes, read one tweet.

She also tweeted that Jay-Z and his pop superstar wife Beyonce wrote a “huge check” to support the burgeoning “Black Lives Matter” movement aimed at improving police treatment of African Americans.

At any rate, it’s sad that Jay-Z is paying bail for strangers, while poor DMX probably can’t even post his own bail. How is that fair? Fame is a cruel mistress.