Todd Harrell -- the former bassist of the rock band 3 Doors Down -- is going to be locked up a while after a judge hit him with the maximum penalty for a firearm charge.

Harrell's reportedly been sentenced to 10 years in a Mississippi state prison for possession of a firearm by a felon. Jackson County Judge Robert Krebs handed down the sentence Thursday.

We broke the story ... Harrell was arrested at his home in Jackson County in June after a domestic violence incident with his wife. When officers arrived they saw guns and drugs in the house and got a search warrant for the residence, which ultimately led to his arrest.