Jesus successfully turned every attack into a victory for the side of grace and mercy.
John 8:4-5 "They say unto him, Master, this woman was taken in adultery, in the very act. Now Moses in the law commanded us, that such should be stoned: but what sayest thou?"
This was possibly the most potentially damaging temptation the scribes and Pharisees ever presented to Jesus. Much of Jesus' widespread popularity with the people was because of His examples of and teachings about God's mercy and forgiveness towards sinners. This was received with great enthusiasm by the people who, before this time had been presented with only a harsh, legalistic, judgmental picture of God.
The scribes and Pharisees had often tried to portray Jesus as condoning or practicing sin because of His association with sinners and His ministry to them when it violated Jewish traditions, such as the Sabbath. However, Jesus had successfully turned every attack into a victory for the side of grace and mercy.
This time, the Jews felt that they had Him "cornered." If Jesus held to His teachings of forgiveness and refused to stone this woman, He would be in direct rebellion to the law of Moses. This would give these Jews legal grounds to kill Jesus. On the other hand, if He stoned the woman as the law declared, the people would forsake Him. It looked like they had Him trapped either way He went.
As always, the foolishness of God is wiser than men, and Jesus rose to the occasion. He did not condone the sin nor disregard the law of Moses. He simply told the one who was without sin to cast the first stone. As the Holy Ghost began to convict them of their own sin, they all had to leave. They, therefore, could not fault Jesus for not stoning the woman. Jesus was justified in His forgiveness of this woman because He was operating under the dispensation of grace. Think about God's grace today.