The world and the church have corrupted a lot of truths when it comes to the Scriptures and the character of God, but none greater than His love and His justice. Because of His character God must love us. He is compelled to do so because God is love and he cannot operate outside of His character.
The same is true about His justice. As much as God loves us, He hates sin equally and must judge it. Just because He must judge sin and the sinners does not mean that His love stops. Remember that He tells us to love our enemies. This has two truths tied to it.
#1 is that we will have enemies. Our enemies are not those whom we have a falling out with or someone who did us wrongly. The Biblical enemies God is speaking about is anyone who is lost. Lost people are attackers of the cross and the work of our Lord Jesus Christ and therefore enemies to the cross and enemies to God. Therefore, they are our enemies. But we are to love them.
Genesis 18:25-26 ESV Far be it from you to do such a thing, to put the righteous to death with the wicked, so that the righteous fare as the wicked! Far be that from you! Shall not the Judge of all the earth do what is just?" (26) And the LORD said, "If I find at Sodom fifty righteous in the city, I will spare the whole place for their sake."
Closely related to the Holiness of God are His RIGHTEOUSNESS and JUSTICE. To simplify, it might be said that:
God's Righteousness is His Holiness in action.
God’s Justice is His Righteousness in rule and government.
God is a Righteous God, because He acts at all times in complete conformity with His Holy Nature and Will.
God's Righteousness is Immutable, He is a Rock. God is referred to as a Rock five times in Deut.32. His Righteousness never changes, His Justice is unfailing; He is faithful in dealing with His people according to His Nature and His revealed Law and Covenants.
He will punish in awful judgment as well as reward bountifully, but always according to His promises and covenants. He is completely above any unjust or deceitful treatment, all His ways are "upright."
Our Righteous and Holy God is also a God of Mercy and Forbearance, but He will not act inconsistent with His Holiness.
In His Righteousness He made a way to justify the sinner, by sending His Infinite Son to be, once for all, the Perfect Sacrifice for sin.
Since the last Adam, (Jesus Christ), lived in perfect obedience to the Holy will of the Father, God could bestow upon the believer Christ's Righteousness without Him ceasing to be Righteous in judgment. The believing sinner becomes righteous in Christ, at the same time God's Righteousness has not been compromised.