I was actually writing about this in my book. Here is an elucidation that might help you understand it. I always try to ask for God's own Wisdom, Knowledge, and Understanding, so I truly believe that this is pretty on point:
WARNING: Its quite long.
"What shall we say, then? Is the law sinful? Certainly not! Nevertheless, I would not have known what sin was had it not been for the law. For I would not have known what coveting really was if the law had not said, 'You shall not covet.' Once I was alive apart from the law; but when the commandment came, sin sprang to life and I died [this statement clarifies that Paul is in fact speaking metaphorically here. Was Paul alive before God gave Moses the ten commandments? No. Of course not. He is speaking on the behalf of humanity in general. I would also like to state that Paul is not saying that the Law of God was non existent before Mount Sinai...because where there id no law there is no transgression. He is simply saying man knew not what his sin was until the Law of God was manifested physically. So then there was no longer any excuse for man to say that he did not what his sin was, because the Law pointed it out...so sin became increasingly sinful through the Law of God in which identifies our sin. It was already sin before, but now that we see it and identify it as sin but yet still choose to do it anyway, then it becomes all the more sinful. For if a man knows to do right, but chooses not to, to him it is sin] l was once alive apart from the law, but when the commandment came, sin came alive and I died [the wages of sin is death. Sin cannot kill if it is not alive. "The sting of sin is death and the power of sin is the Law". The Law of God identifies sin. It animates sin by bringing it to light. Sin then does it's job...which is to separate us from God...which eventually reaps death, because God is the way, truth, and LIFE...Jesus is the resurrection and the LIFE. If you are totally separated from the LIFE through sin you will die. Simple as that. So ultimately, the Law is what causes death. It did this through the carnal extension which prescribed mortal death, but also through the identification and animation of sin...for all sin is a transgression of the Law. The Law of God on it's own right cannot save carnal people from sin...for the Law of God is Spiritual and the flesh is not subject to it. The Law is not the problen, the flesh is the problem. When carnal people try to obey the spiritual Law of God on their own right, it just causes the ease of sin to be all the more enticing by contrast. This is what happened to the Pharisees...who unfortunately did not have God's Spirit]. I found that the very commandment that was intended to bring life actually brought death [If God intended for life to be brought through the Law of God does that mean He failed? By no means! The Law of God is a spiritual entity, but it in itself is not alive and active. It cannot bring life on its own right. It can only condemn...seeing as it is God's standard for judging sin. The flesh is incompatible to the Spiritual Law of God's character...the flesh is not subject to God nor can it be...so therefore it must die...that is why we die to the flesh through Christ (not continue to serve the flesh). So did God fail with His intentions to bring life through the Law of God? By no means! If He purposed it to bring life, then that is what it does...even to this very day. The "problem" that God ran into was, "What do we do in the meantime until the saviour comes?" He answered this question by adding a massive Law (in accordance to the transgressions to His Own Spiritual Law) as an extension, in which tells carnal beings how to atleast attempt to keep the spiritual Law of God, so that there can be a guardian in place until the necessary sin-saviour appears. The solution He came up with was to give this carnal based law indirectly through angels, so that it could be received unto a mediator (Moses) and given to the people that God set apart according to the flesh (OC Israel)...that way God could cleanse His hands of the Mosaic Law and set it aside without it actually being eternal in itself once it was fulfilled. So then thereafter, He sent His Son (Abraham's Seed) to be born under that same carnal law, so that He could fulfill the just requirements of that angelic law (it was added because of transgressions. So the only way to fulfill it was to send someone who had a complete lack of transgressions...We all died through the transgression of one man, and now we can all be made alive through the righteousness of one man). Nowadays--in the age of grace--that Old Covenant is over, but the basis of that Covenant (the Law of God; "the Covrnant Law") is still intact (renewed). The Law of God still is what technically gives life...but God poured out His Spirit to humans so that they would have a Way to keep that Law...what is that Way? The WAY, the Truth, and the Life, of course. The only Way to be saved from sin is by not sinning (transgressing) anymore (by imitating Jesus' sinless character) while simultaneously being cleansed from the consequences of one's past sin (through justification by the sacrifice of the Son of God and therefore the gift of the Holy Spirit)...both of these things can only be done through Jesus Christ and His Spirit....not on our own right. Not by the carnal works of the Mosaic Law. No flesh will be justified (initially nor ultimately) through the works of the Law (of Moses)...because for one thing, the blood of bulls and goats cannot take away sins. Yet it is not the hearers of the Law (of God) who will be (ultimately) justified (through retaining the initial justification found in Christ by repenting in accordance to what God calls sin, and then continuing to abide in Christ...also known as the Word) but the doers of the Law (of God) that shall be (ultimately) justified.
Jesus even said: "If you will enter life, keep the commandments" yet he also said: "Take up your cross and follow (imitate) Me." If the wages of sin is death, then by contrast, obedience reaps life. The Way to keeping the commandments and entering eternal Life is only found in the Way, Truth, and the Life...who is the Word]. For sin, seizing the opportunity afforded by the commandment, deceived me, and through the commandment put me to death [Sin deceived man into thinking that whenever one kept a commandment or two, that they were therefore being righteous and that their righteousness made up for their other sins, but the reality is that even if one keeps all nine but breaks one then they are still a sinner worthy of death. This is what hallened to the Pharisees]. So then, the law is holy, and the commandment is holy, righteous and good [the Law of God is not the problem...the problem is our flesh...so then, why would God do away with the Law and allow our flesh to rule? That makes no sense at all. Wouldn't God instead get rid of that which is unholy (our flesh) by circumcising it and therefore causing us to die to that which is unholy and lawless? He already said that His Commandments are not burdensome. So why does everyone "teach" that God has gotten rid of the Law of God, and instead choose to "teach" that we are saved instantly no matter what our flesh does? Probably because they don't understand the difference between the Law of Moses and the Law of God...probably because they don't understand certain tenses of verbs (i.e. "shall be saved")...probably because these false teachers are carnal and can only understand things at face value. Ultimately, it is the Law of God that condemns us. The Law itself is not death invoking, but rather the sin that it brings alive (through recognition) is the killer. The extension of the Law of God is a more direct killer...it teaches fleshly beings to purge the willful sinners by ordering mortal death for the transgressions of God's Law... it is to illustrate the Spiritual death that transgression causes. But ultimately the path of the power of death sprouts from the Law of God (in an indirect manner). The Law is Holy. It is the Mark. If anyone misses that mark they have thus sinned. The mark defines the mark-missings. There is a consequence for everything. The consequence for someone that is made in the image of an eternal God that misses the mark of His eternal character is eternal death. its as simple as that. So in an ultimate since, the decalogue is "the ministry of death" in and of itself if there is no spiritual savior to accompany them ("Now if the ministry that brought death, which was engraved in letters on stone") because the initial ministry brought the death-inputing Law of Moses as an extension and it even further goes beyond that by being the recognizer of sin, which causes absolute death...maybe that is why the stone tablets are pictured to like head stones (even though it is said that they actually were sapphire rectangles)] Did that which is good, then, become death to me? By no means [again, the Law itself is not death, but the sin that it recognizes is what brings death. So through the recognition of sin, it brings life and power to sin...so in an ultimate sense the commandments are "the ministry of death" in an indirect manner...this is only because the Law is powerless to save on its own right because it is not a living entity]! Nevertheless, in order that sin might be recognized as sin, it used what is good to bring about my death, so that through the commandment sin might become utterly sinful ["If anyone, then, knows the good they ought to do and doesn't do it, it is sin for them". Therefore, sin becomes all the more sinful if man sees his sin, yet still falls short of God's righteous Character]. I [my spirit] do not understand what I [my flesh] do. For what I [my spirit] want to do I [my flesh] do not do, but what I [my spirit] hate I [my flesh] do. And if I [my flesh; the old man] do what I [the spirit; inner man; new man] do not want to do, I [my flesh] agree that the law [of God] is good. As it is, it is no longer I [the true me: my spirit] myself who do it, but it is sin living in me [my sinful flesh]. For I [my spirit] know that good itself does not dwell in me [my flesh], that is, in my sinful nature [again, flesh]. For I [my spirit] have the desire to do what is good, but I [my spirit] cannot carry it out [not alone, the desires of the flesh are too strong]. For I [my flesh] do not do the good I [my spirit] want to do, but the evil I [my spirit] do not want to do--this I [my flesh] keep on doing [that is, if I am striving to be righteous on my own strength]. Now if I [my flesh] do what I [my spirit] do not want to do, it is no longer I [my true self: the inner man] who do it, but it is sin living in me [that is, my flesh] that does it [Paul is still speaking on the behalf of humanity, he is not speaking of himself]. So I find this law at work: Although I [my spirit] want to do good , evil is right there with me [my flesh; temptation]. For in my inner being I [my spirit] delight in God's law [as a human that has a spirit, a spirit that is composed of the breath of God]; but I [my spirit] see another law [of sin and the consequences of sin: death. Death that is both mortal and Eternal] at work in me [my flesh], waging war against the law of my mind [The Law of the LORD] and making me [my flesh] a prisoner [slave] of the law of sin at work within me [my flesh]. What a wretched man I [my flesh] am! Who will rescue me from this [fleshly] body that is subject to death [that is, circumcise me from my flesh and ultimately save me from sin]? Thanks be to God, who delivers me through Jesus Christ our Lord! So then, I myself [true spiritual self] in my mind am a slave to God's law, but in my sinful nature a slave to the law of sin ["So I say, walk by the Spirit, and you will not gratify the desires of the flesh"; "The mind governed by the flesh is death, but the mind governed by the Spirit is life and peace."] Therefore, there is now no condemnation for those who are [truly] in Christ Jesus [What does it mean to abide in Christ? Obey God, who is Christ. How? Obey the Word...who is also Christ: "IN HIM (the Word) you were also circumcised with a circumcision not performed by human hands. Your whole self ruled by the flesh was put off when you were circumcised by Christ" ...So now that we are circumcised of our carnality we can obey God's Law with our true selves. But if we choose to stay slaves to our flesh we shall die. Many don't realize that a circumcision can be reversed and the foreskin can be restored. This is done by repeatedly stretching the foreskin until one is back into an uncircumcised state again. So it also is with the circumcision of Christ]
I (my flesh) want to do all kinds of sinful things even as we speak. That doesn't change. I (my flesh) would love nothing more than to do a nice fat shot of ice. I (my flesh) would love nothing more than to smoke a pack of cigarettes. I (my flesh) would love nothing more than to go back to watching porn and having sex with women. I (my flesh) would love to go back to listening to sinful music. Yet I (my spirit) hate doing these things because of the chaos and havoc that they reap in my life. I (my spirit) love to be at peace. I (my spirit) know that the wages of these things are death. Yet I (my flesh) don't care, but I (my flesh) just want to have a quick pleasurable thrill, and then pay for it later. I (my spirit) was sown in light. I (my flesh) was sown in darkness. My spirit and my flesh are both opposed to each other in order to keep me from doing the things that I (my spirit and also I my flesh) want to do. When I (my spirit) came into me (my flesh) I became a living soul with a mind, a will, and a range of emotions. I (my soul) have a knowledge of both good (my spirit and the law thereof) and evil (my flesh and the pleasures thereof). My soul has the will to choose God or reject God. If my soul sins it shall die. If my soul chooses Life I shall live. For "Those who obey him will not be punished. Those who are wise will find a time and a way to do what is right [including properly keeping the Sabbath completely holy]" (Ecc. 8:5). "Let the conclusion of all of these thoughts be heard: Fear God and obey his commandments, for this is what it means to be human [made in the image of a righteous God]." (Ecc. 12:13) But yet I (my soul) cannot obey God's Law if my spirit is separated from God through the darkness of my flesh...because "Wisdom is better than weapons of war: but one sinner destroyeth much good." (ecc. 9:18) I must have my flesh put off through the power of Christ, so that I (my soul) will obey God and not my flesh. I (my soul) must not contemplate the things of my flesh, so that lust will not be born in my heart...which leads to sin...which leads to death.