John’s readers were confronted with an early form of Gnostic teaching of the Cerinthian variety. This heresy was also libertine, throwing off all moral restraints. Consequently, John wrote this letter with two basic purposes in mind: (1) to expose false teachers and (2) to give believers assurance of salvation.
This epistle is a discourse upon the principles of Christianity, in doctrine and practice. The design appears to be, to refute and guard against erroneous and unholy tenets, principles, and practices, especially such as would lower the Godhead of Christ, and the reality and power of his sufferings and death, as an atoning sacrifice; and against the assertion that believers being saved by grace, are not required to obey the commandments. This epistle also stirs up all who profess to know God, to have communion with him, and to believe in him, and that they walk in holiness, not in sin, showing that a mere outward profession is nothing, without the evidence of a holy life and conduct. It also helps forward and excites real Christians to communion with God and the Lord Jesus Christ, to constancy in the true faith, and to purity of life.Matthew Henry