In the middle of his diatribe against divisiveness among Christians, James makes a vague reference to Scripture that has puzzled many translators and scholars. While there is room for debate about what he meant to say, my own preference for the verse is expressed in the New King James: “The Spirit who dwells in us yearns jealously” (Jas.4:5). This fits quite well with the context, in which James uses very strong language (“you adulteresses!”) to refer to those who desire what is in the world more than they desire God.
I think what James has in mind here are the first two commandments in the Torah, where God makes a point of how He is a jealous God. Jealous of what? It would appear that He is very jealous of our fidelity to Him. In the Old Testament prophetic books, God often refers to Israel as His unfaithful wife, because of her flirtatious relationship with the idols of the surrounding nations. In some places He even expresses the kind of anguish one might expect from a rejected lover.
God wants our hearts! He wants our love! This is not just about how we comply with His standards, but about how we see Him, how we desire Him, how we long to be near Him. He has given everything for us. He longs for us to respond to Him in similar abandon. Having one foot in the Kingdom and the other foot in the world is not only about trying to live a double life (Jas.4:8), it is being unfaithful, like a philandering wife.
But God is gracious (Jas.4:6), and if we find ourselves in that place of wanderlust, He wants us to come home (Jas.4:7-10). “Draw near to God, and He will draw near to you.” He is always ready to forgive, because He wants us more than we can possibly imagine.