Hip-hop legend Eric B. has been released on bail after two weeks in custody over an old warrant — leaving him terrified for his future on the hit TV show “Blue Bloods,” according to a report.

The Eric B. & Rakim icon, real name Eric Barrier, had been held at the Bergen County Jail in New Jersey since October 28 on a 2002 bench warrant for failing to appear 17 years ago at sentencing after he admitted to an assault.

The arrest came just days after he made his debut on “Blue Bloods” — and left him “literally at wits’ end and overcome with anxiety” over his future on the CBS show, his attorney, Patrick Toscano, told NJ.com. Read more in Page Six.