Then, when he says, did that then which is good, he raises a question in regard to the effect of the law.
First, the question, saying, did that then which is good, namely, in itself, bring death unto me, i.e., act as a per se cause of death? For someone could falsely gather this from what he stated above, namely, that the commandment that was ordained to life . . . was found to be unto death to me.
Second, he answers negatively, saying, God forbid. For that which in itself is good and life-giving cannot be the cause of evil and death, because a good tree cannot bear evil fruit (Matt 7:18).
Thi...rd, at but sin, he shows that what he is now saying is in agreement with what he had said above. For the commandment itself does not bring death; but sin, finding occasion in the commandment, brings death.
And that is what he says: but sin, that it may appear sin, through the good of the law, wrought death in me, i.e., through the commandment of the law, because the law is good by the very fact that it brings knowledge of sin. And this occasionally, as it makes sin manifest.
This does not mean that sin worked death through the law, as though there was no death without the law. For it was stated above that death reigned from Adam to Moses (Rom 5:14), i.e., before the law was given. This should be understood to mean that sin worked death through the law, because the condemnation of death was increased when the law came.
And this is what he says: I say that the working of sin is death through good, that sin, by the commandment, might become sinful, that is, as if, on occasion, it makes one sin on account of the precept of the law. And this above measure either because the liability for transgression grew or because the inclination to sin increased with the coming of the law's prohibitions.
As stated above, sin here means the devil, or rather the inclination to sin.
Source: Commentary on Romans