Romans 6:16–18

Paul speaks of those who now obey from the heart and not sin

16Do you not know that to whom you present yourselves as slaves for obedience, you are slaves of the one you obey, either of sin leading to death, or of obedience leading to righteousness?

17But thanks be to God that you were slaves of sin, but you obeyed from the heart the form of teaching to which you were handed over;

18and, having been set free from sin, you were made slaves to righteousness.

Study it word by word

In its context

14For sin will not be master over you, for you are not under law but under grace.

15What then? Shall we sin because we are not under law but under grace? By no means!

…

19I speak in human terms because of the weakness of your flesh. For just as you presented your members as slaves to impurity and to iniquity for iniquity, so now present your members as slaves to righteousness for sanctification.

20For when you were slaves of sin, you were free with regard to righteousness.

Read all of Romans 6

Its words in the original

Obedience