Beloved, I am writing you no new commandment, but an old commandment that you had from the beginning. The old commandment is the word that you have heard. At the same time, it is a new commandment that I am writing to you, which is true in him and in you, because the darkness is passing away and the true light is already shining. (1 John 2:7-8 ESV)
In speaking of the old and the new commandment, John is talking about the same thing but saying that it is new in that it is applied differently.
He talks previously about keeping the commandments of God and having the love of God perfected in us. It's an old commandment written on tables of stone. But the "new" commandment, still being the old commandment is written on the tablet of our hearts. That is what makes it "new". This is where the love of God is perfected in us.
Forasmuch as ye are manifestly declared to be the epistle of Christ ministered by us, written not with ink, but with the Spirit of the living God; not in tables of stone, but in fleshy tables of the heart. -2 Corinthians 3:3