John 17:4 contains a clear connection between the Son glorifying the Father and something specific—here, it’s the accomplishment or fulfillment of the Father’s work given to Jesus to do. What is remarkable about verse 4 is that, like the final verse in ch.16, the verbs are in the past tense, which means that Christ is looking at this work as completed or fulfilled. Everything he has said and done in his earthly ministry up to this point has been immensely significant, but all of it has been leading up to what is come, so he’s obviously not excluding his upcoming death on the cross for, as it’s already been highlighted, that’s the pathway of his glorification.
How exactly does this glorify God? There is nothing more that Christ could do to glorify God since he never failed to obey the Father at any time, so much so that he was always pleasing to the Father, as his voice from heaven declared—”This is my beloved Son, in whom I am well-pleased.” Everything that was given to the Son to do and obey from the Father, he did perfectly.

Beginning with Adam in the garden, where everyone else who was given instruction from God failed, Christ succeeded. Only Jesus Christ can with integrity testify to God the content of v.4. Only he can completely and genuinely make proclamations, such as God’s people long to make—Ps. 119:57 The Lord is my portion; I have promised to keep Your words. 58 I sought Your favor with all my heart…59 I considered my ways And turned my feet to Your testimonies. 60 I hastened and did not delay To keep Your commandments. 61 The cords of the wicked have encircled me, But I have not forgotten Your law.
And here is how his perfect obedience relates to vv.2-3 in the granting of eternal life—life comes to sinners only by receiving the perfect righteousness of Christ by faith—Rom. 4:5 But to the one who does not work, but believes in Him who justifies the ungodly, his faith is credited as righteousness… 5:18 So then as through one transgression there resulted condemnation to all men, even so through one act of righteousness there resulted justification of life to all men. 19 For as through the one man’s disobedience the many were made sinners, even so through the obedience of the One the many will be made righteous.
In light of that truth, how foolish then is it then to put forth any efforts motivated by self-righteousness or self-atonement! Do we really think any of our sin-stained acts of obedience could ever improve or add to our righteous standing before God? Do we think that any kind of service towards others could possibly pay for even one sin?

When we think about Christ’s finished work like he does, it should infuse us with great security and humility. We get the privilege of eternal life, not because of anything we did, but because of what was done on our behalf by the Son of God. More specifically, we are granted this supreme favor because Christ glorified the Father, having accomplished the work he was given to do.