If we say that we have fellowship with him and walk in the darkness, we lie, and don't tell the truth.
John’s claim here is that the Christian who professes to have fellowship with God who is light (holiness) but disobeys Him is lying. A practicing sinner cannot have close fellowship with a holy God, though he can have a relationship with God (i.e., be a true Christian). God revealed this truth throughout Scripture. Action was a very important part of true knowledge for John, and it must be for us as well (cf. James).