Jesus prayed in the Garden of Gethsemane, just a short while after urging His disciples to drink of His cup. As He prayed fervently and emotionally to His Father in heaven, the symbol of the cup was fresh in His mind. Just as He had given His disciples a cup from which to drink, so had the Father placed a cup before Him! Notice Matthew 26:39: "He went a little farther and fell on His face, and prayed, saying, 'O My Father, if it is possible, let this cup pass from Me; nevertheless, not as I will, but as You will.'"
In the Old Testament, the cup is also a metaphor for the divine punishment of sin. Hence, Jesus' death would involve far more than just physical torture and death. Christ would become the target of untold divine wrath, as every sin that had ever been committed would be heaped on this one sinless Being! He who had sought always to do the will of His Father perfectly, He who had heard His loving Father exclaim, "This is My beloved Son, in whom I am well pleased," would now experience His Father's overflowing wrath for all sin, including all the worst sins! Some of what He suffered was for our sins—yours and mine.
Jesus knew that death and incurring God's wrath for sin comprised the climax of His mission on earth as the Messiah. But now, as that hour approached, His awareness of God's wrath against sin became even more intense! The Bible explains this in detail in Romans 1:18—3:20. To Jesus, it was an unimaginable horror!
The second and third times He prays in the Garden, He changes His words slightly, as He realizes He definitely has to drink of that cup: "O My Father, if this cup cannot pass away from Me unless I drink it, Your will be done" (Matthew 26:42, 44). He now fully accepts the fact that the only way to get past this ordeal is to go through it.
The cup is still on Jesus' mind even after the soldiers from the High Priest come to capture Him. When Peter tries to defend Him physically with a sword and misses Malchus' head, cutting off his ear instead, Jesus says to Peter: "Put your sword into the sheath. Shall I not drink the cup which My Father has given Me?" (John 18:11). Indeed! And shall we not drink the cup which our King has given us?