Most people are familiar with the story found in John 7:53-8:11. Pharisees bring a woman caught in adultery to Jesus and ask for his judgment. It is a trap: if Jesus calls for the death penalty, they can accuse him of bypassing Roman law. If Jesus excuses her, then they can accuse Jesus of bypassing OT law, which called for the death penalty. Jesus asked for "one without sin" to cast the first stone. In the OT, the command was for the witnesses to the crime to cast the first stone (Deut 17:7). Jesus may have been suggesting that the supposed witnesses were guilty, because they did nothing to stop the crime before it started, and their very observation was shameful. Whatever Jesus meant, it worked: "Does no one condemn you? ... Then I do not condemn you either. Go and sin no more."
Here's the problem with the passage: almost all English Bibles have a note attached to the passage warning that it is not found in the earliest manuscripts. Our Bibles are based on the best available ancient manuscripts. One of the differences between modern Bibles and the King James Version is that the King James was based on manuscripts from the twelth century and later, but modern Bibles are based on manuscripts dating back to the second century.
It turns out that not a single manuscript of John before the fifth century has the story of the adulterous woman. The story first begins to show up in some fifth century manuscripts, but even then, scribes marked the text with obeli, special symbols indicating that they doubted that the story was originally in the text. Some later manuscripts placed the story in a different part of John, or even in Luke. If that evidence were not enough, the vocabulary and style of the passage are quite different from the rest of John. The evidence is strong enough that the majority of NT scholars do not believe that John wrote it.
So that's the bad news. Here's the good news: the same vast majority of NT scholars who don't believe that John wrote it, also believe that the story is true. That is, it is a true story about Jesus that circulated independently and then was eventually inserted into John by a later scribe. There are three major reasons for believing this. First, some church fathers discussed the story, although they did not say it was from John. Papias, who probably died in AD 135, refers to the story. Second, it is very unlikely that the story would have been invented by later generations of Christians. From the second century on, Christians took a very hard line against adultery (especially in women), and sometimes would not allow official forgiveness of adulterers at all. Finally, the story just sounds like Jesus. If you read through the various apocryphal gospels (such as the Gospels of Thomas, Judas, Peter, Mary Magdalene, etc), you begin to develop a nose for what is likely true and what was made up by later generations. This story has the ring of truth.
What's the bottom line? This story does not belong to John, but it belongs in our Bibles. It is a true story about Jesus that shows his compassion for sinners as well as his anger towards hypocrisy. It does not teach that sin is acceptable: Jesus still calls the woman to repentance.
The picture: "The Unfaithful Wife" from Jesus Mafa, 1970s. The Jesus Mafa paintings are produced by French artists and Mafa villagers.