If we say that we have fellowship with him and walk in the darkness, we lie, and don't tell the truth.
To "walk" is to order one’s life, conduct one’s behavior, or pursue a way of life. "Walk" is present tense and suggests the habitual direction of one’s life. As we will shortly see, the Christian is not totally without sin in his life. He sometimes allows the weakness of his flesh to overcome the aims of the spiritual man, and he sins; but sin is not the direction of his life. The general tenor of his life is one of holiness and righteousness before God. John is not talking about one who lives the Christian life and occasionally sins; he is talking about someone who continues in the practice of sin. No one can engage in a habitual walk of darkness, or sin, and live in fellowship with God at the same time.