Yes, he was executed but that was as a defendant he had previously been called to Judge a death penalty case. It is recorded in Gospel according to St John Chapter 8:
1
while Jesus went to the Mount of Olives. (Footnote 1)
2
But early in the morning he arrived again in the temple area, and all the people started coming to him, and he sat down and taught them.
3
Then the scribes and the Pharisees brought a woman who had been caught in adultery and made her stand in the middle.
4
They said to him, "Teacher, this woman was caught in the very act of committing adultery.
5
Now in the law, Moses commanded us to stone such women. (Footnote 2) So what do you say?"
6
They said this to test him, so that they could have some charge to bring against him. Jesus bent down and began to write on the ground with his finger. (Footnote 3)
7
(Footnote 4) But when they continued asking him, he straightened up and said to them, "Let the one among you who is without sin be the first to throw a stone at her."
8
Again he bent down and wrote on the ground.
9
And in response, they went away one by one, beginning with the elders. So he was left alone with the woman before him.
10
Then Jesus straightened up and said to her, "Woman, where are they? Has no one condemned you?"
11
She replied, "No one, sir." Then Jesus said, "Neither do I condemn you. Go, (and) from now on do not sin any more."
Footnotes:
1 <1> Mount of Olives: not mentioned elsewhere in the gospel tradition outside of passion week.
2 <5> Lev 20:10 and Deut 22:22 mention only death, but Deut 22:23-24 prescribes stoning for a betrothed virgin.
3 <6> Cf Jeremiah 17:13 (RSV): "Those who turn away from thee shall be written in the earth, for they have forsaken the , the fountain of living water"; cf John 7:38.
4 <7> The first stones were to be thrown by the witnesses (Deut 17:7).
http://www.usccb.org/nab/bible/john/john8.htmNo one seems to want to follow his example
Note on Footnote 3. Footnote 3 cites Jermiah 17:13 which reads as follows
O hope of Israel, O LORD! all who forsake you shall be in disgrace; The rebels in the land shall be put to shame; they have forsaken the source of living waters (the LORD).Footnote 3 then cites John 7:38:
Whoever believes in me, as scripture says: 'Rivers of living water (Footnote 14) will flow from within him.'" Footnote 14 of John 7:38 reads as follows:
Living water: not an exact quotation from any Old Testament passage; in the gospel context the gift of the Spirit is meant; cf John 3:5. From within him: either Jesus or the believer; if Jesus, it continues the Jesus-Moses motif (water from the rock, Exodus 17:6; Numbers 20:11) as well as Jesus as the new temple (cf Ezekiel 47:1). Grammatically, it goes better with the believer.More from the Catholic notes on John, this time John 7:53:
17 <7:53-8:11> The story of the woman caught in adultery is a later insertion here, missing from all early Greek manuscripts. A Western text-type insertion, attested mainly in Old Latin translations, it is found in different places in different manuscripts: here (John 7:53), or after John 7:36 or at the end of this gospel, or after Luke 21:38, or at the end of that gospel. There are many non-Johannine features in the language, and there are also many doubtful readings within the passage. The style and motifs are similar to those of Luke, and it fits better with the general situation at the end of Luke 21:but it was probably inserted here because of the allusion to Jeremiah 17:13 (cf the note on John John 8:6) and the statement, "I do not judge anyone," in John 8:15. The Catholic Church accepts this passage as canonical scripture.http://www.usccb.org/nab/bible/john/john8.htm#v15