Meek Mill will finally be freed from prison on Tuesday.

A judge in a Philadelphia court ruled that Meek - born Robert Rihmeek Williams - would be released after it was discovered that the officer who arrested the rapper in 2007 "was on a secret DA's list of allegedly corrupt cops," reports Page Six.

The Supreme Court overruled Philadelphia Judge Grenece Brinkley who denied the rapper bail last week after refusing to dispose of the conviction.

She then set a hearing for 60 days later, which she was criticised for following her decision.

Meek's lawyer Joe Tacopina issued a statement on behalf of the rapper following the news of his release: "I’d like to thank God, my family, my friends, my attorneys, my team at Roc Nation including Jay Z, Desiree Perez, my good friend Michael Rubin, my fans, The Pennsylvania Supreme Court and all my public advocates for their love, support and encouragement during this difficult time. While the past five months have been a nightmare, the prayers, visits, calls, letters and rallies have helped me stay positive. To the Philadelphia District Attorney’s office, I’m grateful for your commitment to justice – not only for my case, but for others that have been wrongfully jailed due to police misconduct. Although I’m blessed to have the resources to fight this unjust situation, I understand that many people of colour across the country don’t have that luxury and I plan to use my platform to shine a light on those issues."

He added, "In the meantime, I plan to work closely with my legal team to overturn this unwarranted conviction and look forward to reuniting with my family and resuming my music career."

In November 2017, Meek was sentenced to two to four years in prison by Judge Brinkley for a probation violation.

A request for Judge Brinkley's recusal on the grounds of bias was submitted later in the month.

The sentence was overturned by the Supreme Court of Pennsylvania following several appeals from Meek's lawyers.

In February, Meek's legal team filed a petition challenging the credibility of one of the police officers involved in Mill's 2007 arrest for drug and gun charges.

The Philadelphia District Attorney's Office replied to Meek's petitions saying "there is a strong showing of likelihood of the Petitioner’s conviction being reversed (in whole or in part)."

Over the past six months, Meek has seen support from Al Sharpton, Kevin Hart and Colin Kaepernick.

Jay-Z penned a piece in The New York Times in defence of the rapper signed to his label Roc Nation saying, "Probation is a trap and we must fight for Meek and everyone else unjustly sent to prison."

The Super Bowl and Olympics paid tribute to Meek earlier this year.