What did the apostle John mean by a sin not leading to death in 1 John 5:16-17 (New King James Version)?
It may seem that the statement "all unrighteousness is sin" in verse 17 contradicts "there is sin not leading to death," especially in light of the fact that Romans 6:23 clearly teaches that all sin results in death. However, we have to study all of the scriptures about sin and salvation together. Jesus taught that sin would result in death, but He also explained how a sinner could escape death. Using the tragic death of 18 people killed in a building collapse, He explained in Luke 13:3-5 that everyone will perish unless he or she repents.
Any sin can result in death, and it will unless a sinner repents. Conversely, no sin needs to lead to eternal death if a person turns from it, seeks God's forgiveness through Christ's sacrifice and commits to obedience from that point on.
So a sin not leading to death is a sin where the sinner is not hardened and unrepentant.
Our booklet Transforming Your Life: The Process of Conversion gives a very helpful explanation about the process of repentance, forgiveness, receiving the gift of God's Holy Spirit and continuing faithfully in the Christian way of life.