1 John uses Cain as an example of someone who murdered his brother and explains it in terms of contrasting deeds. It also says hatred of a brother is like murder in this framework. See 1 John 3:12 and 1 John 3:15.
In 1 John 3:11–15 the writer restates a basic message: believers should love one another. He contrasts this with Cain, who murdered his brother because their lives went in opposite moral directions. This passage sits within a longer section describing what characterizes “children of God” versus those who do not live that way (1 John 3:10). Just before, the writer links right living with being “born of God” and then narrows the focus to love as a central, long-standing message.
These verses treat “love one another” as a foundational message the community has had “from the beginning” (verse 11). The writer frames love for fellow believers (“the brothers,” verse 14) as a visible marker that someone has moved from “death” to “life,” while lack of love means “remaining in death” (verses 14–15).
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 1 John 3:12, then read the surrounding section so the answer stays connected to the passage's flow.
12unlike Cain, who was of the evil one, and killed his brother. Why did he kill him? Because his works were evil, and his brother`s righteous.