The longest prayer by Jesus is the so-called High Priestly Prayer and it’s found in John 17.
Only the Gospel of John includes the Farewell Address by Jesus and we find it in John 16. Next comes His High Priestly Prayer in John 17, but first Jesus tells His disciples that He’s going away, and like as they much, they can’t follow Him where He is going. Naturally the disciples all want to go, some even telling Him they’re willing to die with Him, but we know they all forsook Him on the night of His betrayal. Before Jesus dies on the cross, He tells them “it is to your advantage that I go away, for if I do not go away, the Helper will not come to you. But if I go, I will send him to you” (John 16:7). 
Jesus was referring to the coming of the Holy Spirit in mentioning the Helper. Jesus says that “when he comes, he will convict the world concerning sin and righteousness and judgment” (John 16:8). He wants the disciples to depend on the Holy Spirit so they” know that “When the Spirit of truth comes, he will guide you into all the truth, for he will not speak on his own authority, but whatever he hears he will speak, and he will declare to you the things that are to come” (John 16:13). The advantage is the Holy Spirit can be in all believers at the same time while Jesus could only be in one place at a time on earth, but even now, there’s a sense of dread among and the disciples, so before Jesus’ prays His High Priestly Prayer, He reminds them that even though they’ll go through a severe trial of their faith, it is only “in me you may have peace. In the world you will have tribulation. But take heart; I have overcome the world” (John 16:33).
The High Priestly Prayer
Jesus made sure that His disciples would be taken care of while He hung on the cross and after He died, so He prays to the Father that “While I was with them, I kept them in your name, which you have given me. I have guarded them, and not one of them has been lost except the son of destruction, that the Scripture might be fulfilled” (John 17:12). Jesus says that He has kept them from the evil one and had “guarded them,” but since He was going to the cross, He could not guard them as before, so He says, “I am no longer in the world, but they are in the world, and I am coming to you. Holy Father, keep them in your name, which you have given me, that they may be one, even as we are one” (John 17:11). Here, Jesus hands over the responsibility of guarding His disciples to the Father while He is not able to while on the cross and after His physical death.
Jesus Prays for You
The longest prayer by Jesus is found in John 17 and it’s a prayer for His disciples, but it’s also a prayer for those who will yet believe and who haven’t yet been born (like us!). Our Lord said, “I do not ask for these only, but also for those who will believe in me through their word” (John 17:20), and what was “their word?” Their word was the Gospels and much of the New Testament. That’s how we came to believe…through their word about the Word…the Word of God, and millions more every year are believing in Jesus through their word, or the Word of God. Imagine that: Jesus prayed for you over 2,000 years ago and He’s still praying for you today!
Jesus prayed for those who hadn’t yet been born! He prayed for us too if we have believed. Jesus prayed “That they may all be one, just as you, Father, are in me, and I in you, that they also may be in us, so that the world may believe that you have sent me” (John 17:20-21), so even though the disciples were on earth 2,000 years ago, Jesus prayed they and we would all be one…the Body of Christ. And we are all one…in Christ. Jesus prays for us today too, not just 2,000 years ago. The Scripture says, “[H]e is able to save to the uttermost those who draw near to God through him, since he always lives to make intercession for them” (Heb 7:25). Wow! Jesus lives to make intercession for us. If we’re on Jesus’ prayer list, we should be humbled.
Seeing His Glory
Haven’t you ever wanted to see God? Have you ever imagined what He might look like? That’s difficult because God is Spirit. Only Jesus showed us the Father, but not in a physical sense. Jesus revealed the character of the Father, not His form or shape, but the disciples yearned to see the glory of God, and Jesus wanted them to see it too! He has already shared some of His glory with the disciples on the Mount of Transfiguration, saying to the Father, “The glory that you have given me I have given to them, that they may be one even as we are one” (John 17:22). Even more, Jesus wants the disciples to see His glory, saying, “Father, I desire that they also, whom you have given me, may be with me where I am, to see my glory that you have given me because you loved me before the foundation of the world” (John 17:24). After 2,000 years, the disciples have finally seen the glory of God in the Highest…the Lord Jesus Christ, the Son of God. So will we someday.
Jesus’ High Priestly Prayer is among the deepest, most moving prayers in the Bible, but you can almost sense the dread in the disciple’s hearts as they know Jesus is going away as He is going to suffer and die. Their uncertainties about the future were almost more than they could bear, but don’t we also carry burdens that seem to overwhelm us and make us feel forsaken by God? The truth is, Jesus tells us to “Come to me, all who labor and are heavy laden, and I will give you rest. Take my yoke upon you, and learn from me, for I am gentle and lowly in heart, and you will find rest for your souls” (Matt 11:28-29). Not only may we come to Him, we know He prays for us. If you’ve never trusted in Christ, you have no access to the throne room of heaven, but if God’s brought you to a time of repentance and you’ve put your trust in Christ, Jesus reminds you, “…my yoke is easy, and my burden is light” (Matt 11:30).
Here is some related reading for you: Why Should Christians Pray if God is Sovreign? 
Resource – Scripture quotations are from The Holy Bible, English Standard Version® (ESV®), Crossway Bibles. (2007). ESV: Study Bible: English standard version. Wheaton, Ill: Crossway Bibles. Used by permission. All rights reserved.