1 John speaks of an "old commandment" they had from the beginning and also calls it a "new commandment" that is true in Christ and in them. The context explains it in terms of light and love versus darkness and hate. See 1 John 2:7–8.
In 1 John 2:7–11, the writer insists that his moral charge is both “old” and “new.” It is old because the readers have heard it from the start of their Christian instruction, yet new because it fits the present reality: darkness is fading and true light is already shining. This unit sits inside a larger section about living consistently with God as “light” and not merely claiming spiritual knowledge. Just before it, the writer links knowing God with obeying what God commands and highlights that anyone who claims to remain “in him” should live as he lived (2:3–6).
This paragraph ties “light” and “darkness” to ordinary community relationships. The writer’s explicit test is not abstract insight but whether someone loves or hates a “brother” (verses 9–11). A claim to be “in the light” is treated as false if it is paired with hatred (verse 9).
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 2:7-8, then read the surrounding section so the answer stays connected to the passage's flow.
7Brothers, I write no new commandment to you, but an old commandment which you had from the beginning. The old commandment is the word which you heard from the beginning.
8Again, I write a new commandment to you, which thing is true in him and in you; because the darkness is passing away, and the true light already shines.