Read the context:
Romans
6:12 Let not sin therefore reign in your mortal body, that ye should obey it in the lusts thereof.
6:13 Neither yield ye your members [as] instruments of unrighteousness unto sin: but yield yourselves unto God, as those that are alive from the dead, and your members [as] instruments of righteousness unto God.
6:14 For sin shall not have dominion over you: for ye are not under the law, but under grace.
6:15 What then? shall we sin, because we are not under the law, but under grace? God forbid.
6:16 Know ye not, that to whom ye yield yourselves servants to obey, his servants ye are to whom ye obey; whether of sin unto death, or of obedience unto righteousness?
6:17 But God be thanked, that ye were the servants of sin, but ye have obeyed from the heart that form of doctrine which was delivered you.
6:18 Being then made free from sin, ye became the servants of righteousness.
Then notice the last verse of chapter 7:
7:25 I thank God through Jesus Christ our Lord. So then with the mind I myself serve the law of God; but with the flesh the law of sin.
The Ten Commandments are not "sin". What is sin is violating them. The law of sin is the law in your members that violates the righteous law. When you are violating them, that brings you "UNDER" the law. UNDER its condemnation.
But if you are in the Spirit, your old man is dead to sin. When you present a set of keys to a dead man to try and tempt him to steal the Mercedes that is parked in the parking lot, the dead man has no reaction, and does not react. He's dead. Your old man is dead, but now you are living your new life in the Spirit and this is the life that is under Grace.