It is a pressing issue for some studying the Scriptures that on one hand we are given the message that we are not justified by our works and on the other hand that we must obey the commandments of God and do good works for which we will be judged. How are the two compatible?
The solution to this issue is found in the teaching of deification, which is the key to the gospel message. Deification means union with God which means not only connection with Him but also participating ourselves in the fullness of His life and existence. That is participating in His infinite and eternal life beyond our limited time/space existence. Once this is understood as the promise of God to man we can see why we are called to be perfect as He is perfect and holy as He is holy. That is we are called to live His righteousness which we know and do through obedience to His commandments. However, we also realise that we are unable of our own strength to achieve perfection because we are imperfect, which is why we confess ourselves as sinners. It is impossible for time/space creatures to transcend their condition with its limits and weaknesses by their own strength/energies. Thus, it is impossible to be justified by our works. Obedience to the Law in itself is incapable of saving us. Rather to transcend our condition we must be helped by God, He must give us to share in His energies that we may live as He does. That is we are saved by the grace of God, which sets us free from our limits to participate in His free eternal life. We are not saved by grace to escape from works but to participate in eternal works that transcend our own works. Why does not God just do this for us all and why must we still obey? Because to participate in the life of God means that we must both be unique persons and free. God cannot make us good only of Himself else it would deny our freedom and unique personhood and we would no longer be the ones participating nor would we be living as He lives freely. This is why we must have faith because in this we express our free will to live as God lives. Through faith we own God’s life as our life by obedience and doing His will. This means that we truly share in His life freely of our own will and living His life with Him. He is the only one who is truly free and only by sharing in His freedom, by uniting to His will through obedience, do we also become truly free.
So, deification means that we must live the righteousness of God as our own but our own good works of themselves cannot save us because we cannot transcend our state of life without the grace of God.