When you were slaves to sin, you were free from the obligation to do right.
And what was the result? You are now ashamed of the things you used to do, things that end in eternal doom.
But now you are free from the power of sin and have become slaves of God. Now you do those things that lead to holiness and result in eternal life.