James says "friendship with the world is enmity with God" (James 4:4). In the same passage he says God "gives more grace" and opposes the proud but gives grace to the humble (James 4:6).
In James 4:4–6 James sharply warns that choosing “friendship with the world” puts a person in active opposition to God. He frames this as unfaithfulness, like a spouse breaking trust, and says the choice inevitably creates hostility toward God. He then appeals to Scripture to underline that God’s Spirit wants wholehearted loyalty. These lines sit inside a rebuke of quarrels, cravings, and conflicted desires among the readers (James 4:1–3). James treats outward fights as a symptom of inner loyalties pulled toward self-serving wants.
James presents divided loyalty as the core spiritual problem behind the conflicts he has been describing (4:1–3). Explicitly in the text, “friendship with the world” is set against loyalty to God: it is called “enmity with God,” and choosing to be the world’s friend is described as making oneself God’s enemy (4:4).
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with James 4:4, then read the surrounding section so the answer stays connected to the passage's flow.
4You adulterers and adulteresses, don`t you know that friendship with the world is enmity with God? Whoever therefore wants to be a friend of the world makes himself an enemy of God.