For I will be merciful to their unrighteousness, and their sins and their lawless deeds I will remember no more.
Hebrews 8:12 (NKJV)
When a court rules "not guilty," it does not mean the defendant is not guilty of a crime. Rather, the case of guilt was not proven beyond a reasonable doubt. However, in our case before God's court of law, we were both found "guilty" and "not guilty" at the same time. "Guilty" because everyone has sinned against God, and no one can ever be reconciled to Him on their own. "Not guilty" because we received an eternal pardon through Jesus Christ's death and resurrection.
The finished work of Christ on the Cross not only removed the dreaded penalty of our sin, but it also changed our standing before God. By taking away our unrighteousness and giving us His perfect righteousness (cf. 2 Corinthians 5:21), Jesus reconciled us to the Father—not as a proven guilty sinner, but as an innocent son or daughter completely free of sin's guilt and condemnation.
In our human court, the guilty must pay their debt to society, and even if they have, many still bear the shame and stigma of their past offences. And if they are unable to shake or completely forget their past, they bear an enormous burden of rejection and self-loathing.
In God's court of law, He declared us righteous so that He could justly promise not to record or even remember our sins, and thus we are free of all fear of condemnation. As a result, any believer who is not fully convinced of the gospel truth cannot walk in freedom and victory. We can overcome sin and live a righteous life because we have the Holy Spirit within us to help us in our battle against sin. If we sin, the Holy Spirit doesn’t forsake us but rather helps us to repent (John 16:8) and reminds us of our identity and destiny as beloved sons and daughters of God.
When one is confident in God's love, there is no fear of judgement from God and no desire to sin against God. Learn to live as boldly and authentically for the gospel as you can and trust God to lead you.