John's epistles are known for their references to love, both our love for God and God's love for us. John was not known for his exhortations to do good works in obedience to God. Yet we have run across another exhortation. That the apostle exhorts us to obedience to God in an epistle that mainly shares God's love for us tells us of the importance of heeding John's advice.
Our actions speak louder than our words. This is true of our daily lives, and it is true of our relationship with Christ. We can call ourselves a Christian all day long, but if we are not living in obedience to Christ, our words are empty. We can call ourselves trees, but if we do not have leaves and bark, our words only make us sound crazy.
John stressed this point in this verse. John makes it clear that a person who claims to be a Christian yet does not obey God's commands is a liar. In the very next sentence, John makes it clear that the love of God is perfected in the person who keeps God's commands. This person is not a liar.
There are only two alternatives for those who call themselves Christians. Either they can walk the way they want to walk and become a liar, or they can walk as Jesus walked and be truthful. We cannot walk the way we want to walk, yet reap all of the benefits of a God-focused life. It is simply not possible.