"But if the ministration of death, written and engraven in stones, was glorious, so that the children of Israel could not steadfastly behold the face of Moses for the glory of his countenance; which glory was to be done away: How shall not the ministration of the spirit be rather glorious ?"
Here Paul is contrasting the two covenants--the tables of stone versus the tables of the heart, the letter versus the Spirit, the ministration of death versus the ministration of the Spirit, and the ministration of condemnation versus the ministration of righteousness.
Please notice that the Ten Commandment law was not the old covenant and was not done away. It was the ministration or application of the law, not the law itself, that was done away. This was accomplished through Christ when He delivered us from the curse of condemnation and death. The glory of His ministration of righteousness was so much greater than the glory of the law that it outshone and did away with the former glory. On the tables of stone, the literal letter of the law demanded death. There was no grace or life-giving power. That same law, written in the heart through the action of the Spirit, brought grace, pardon, and power to obey. This was the exceeding glory of the ministration of righteousness.
One more point to remember: What was done away? Verse 7 says that the glory "was to be done away" of that ministration of death. The law was not abolished--only its manner of being ministered or applied. Now it would be
ministered by the Spirit on the heart instead of on the stone. But the same law functioned under both old and new covenants.