Lil Boosie has told TMZ, he's finally realized he's a hardcore drug addict and now that he's been sentenced to prison, he wants to focus on kicking his habit.

As previously reported, the Louisiana rapper was sentenced to 8 years in prison Tuesday after copping a guilty plea for attempting to smuggle drugs into prison — 3 separate times.

Now, Boosie's lawyer says the rapper is happy with the resolution — because Boosie is confident officials will allow him to participate in a drug rehab program so he can beat his addiction to codeine and other drugs.

Boosie — who's also facing 1st degree murder charges in an unrelated case — released a statement to TMZ saying, "Don’t worry about me I am getting help with my drug addiction and I am accepting full responsibility for the choice I made."

Boosie adds, "I am going to fight the false murder charge till the end. Love you all."