A fascinating and significant passage that uses quintessentially Hebraic thought modes, particularly parallelism, but with a curious dose of Greek as well (my translation follows).
- v3: We know we have known him if we keep his commands
- v4: One saying, "I have known him" and not keeping his commands is a liar
- v5: But whoever keeps his word [logos], in that one God's love is completed
- v6: whoever says, "I abide in him" should walk as he walked
- v7: I write no new command but an old command you had from the beginning. The old command is the word [logos] you heard
Note that "word" is used in parallel with "command" and as a synonym for it.
I presume that the old command is Jesus' "new commandment" of John 13:34, 35 to love one another which all the disciples had from the beginning, especially since this references the Torah (See Matt 22:37 & Deut 6:5, Matt 22:39 & Lev 19:18). Indeed, it was common to refer to some of God's commands (or commandments) as "words" (eg Deut 10:4, 4:13, etc), hence our English "decalogue". Not that "word" in 1 John 2:5 refers to the 10 commandments, but that "word [logos]" can refer to God's commands.
Therefore, I understand the use of "word" in this passage to mean God's command to love and live as Jesus did; and thus abide in God's love. (We know from elsewhere that such a life is a miraculous work of God as well, so John is discussing the consequences of the Christian life and not our earning the Christian transformation (2 Cor 5:14-18).