Lil Boosie was released early by prison officials because of his good behavior behind bars ... but Boosie's friend Webbie thinks the rapper was really sprung by a much higher power than the warden.
Webbie hails from Louisiana, just like Boosie, and tells TMZ it was the hand of God that opened the prison doors -- "I told Boo that God has a plan. He got my brother free."
Part of God's plan ... according to Webbie includes laying down tracks -- he says now that LB is sprung ... they're going straight into the studio to start making music together again.
Webbie says he plans to surprise Boosie at home in Baton Rouge ... and then the whole town's gonna celebrate Boosie's freedom.