TheListener - Sad Emo gave a great answer, and I'd like to share what I understand about this topic.
Eph 2:8 For by grace you have been saved through faith. And this is not your own doing; it is the gift of God,
Eph 2:9 not a result of works, so that no one may boast.
Eph 2:10 For we are his workmanship, created in Christ Jesus for good works, which God prepared beforehand, that we should walk in them.
All throughout Paul's writing in Romans, Galatians, and Ephesians we see him admonishing his readers that "works" or "merit" will not gain you salvation. When Paul the Apostle was Saul the Pharisee, he believed in quite the opposite. As we see in Philippians 3:5,6 Paul was a man of strict self-discipline and zeal for the Jewish Law. But when he became a follower of Christ, he announced that all his education and heritage were a loss and "rubbish". Why? He goes on to explain in 3:9 -
Phi 3:9 and be found in him, not having a righteousness of my own that comes from the law, but that which comes through faith in Christ, the righteousness from God that depends on faith
The Jews of that time (and still many people today) were relying on themselves, through there own effort, for righteousness and purity before God, instead of relying on God. This is why Paul constantly exhorts his readers to get rid of this idea of autonomy and self-reliance, and look to God and God alone as their Savior.
So if good works can't gain salvation, then bad works can't lose it, right? Right! At the end of Romans chapter 7, Paul defines the struggle between the righteousness of the reborn spirit and the sinful nature of the flesh. Tying into that, Romans 8:1 tells us that Christ does not condemn the Christian when he fails (c.f. 1 John 1:9). With this is in mind, we look at Ephesians chapters 4 and 5. Paul tells Christians to put away all sinful action, so that we may be imitators of God as we are children of God. Paul wanted the Ephesians to separate themselves from the pagan world around them, showing the world that they were under a better influence (the Spirit) and walked the path of the "new man" in Christ. Eph 5:2 tells us to walk as Christ walked (in love). This is in sync with the two greatest commandments. All the actions Paul lists are in disobedience of loving God with all your heart, mind, soul, might, and body (Matt 22:37; Mar 12:30; 1 Cor 6:19,20; Rom 12:1).
For a person to accept Christ as their Redeemer and then to continue in willful disobedience to the message of righteousness (the message being to walk in love) is a slap in Jesus' face, as stated in Hebrews 10:26. John writes in 1 John 3:9 and 1 John 5:18 that a true Christian, who has received the regenerative Holy Spirit, simply cannot forsake the desires of God. This does not mean the Christian will not sin (literally "miss the mark"), because as Sad Emo noted, the regenerative work of the Holy Spirit is a progressive process (the theological term is sanctification i.e. being cleansed of sinful desire). John only means to tell us that as we are sanctified, our desire will be to please God and not our flesh.
The root of all these writings are dealing with an issue of the heart. The man who professes Christ as Savior and means it in his heart will naturally conform to the desires of the Spirit and the new man, while the man who professes Christ with his mouth but does not with his heart will continue to walk in darkness, but at the same time proclaim he is sinless. John identifies and warns against this in 1 John 1:6-9. A great illustration of this condition of heart is James chapter 2. Here we see outlined a person who professes faith in Christ, yet there is no fruit of the Holy Spirit in their life. Here the author James proclaims this to be a "dead" faith.
This was really long, I know, but I hope that helped a little. :)