What does Matthew 26:31 mean?
The Passover meal has ended (Matthew 26:17–29). Jesus and 11 of His disciples (John 13:29–30) are walking in the night toward the Mount of Olives. Jesus has told them several difficult things during the evening. He has said that one of them would betray Him, causing each man to doubt his own loyalty. Now Jesus says that all of them will fall away because of Him this night.Jesus is describing something different from betrayal, though the disciples might not yet understand that. Jesus knew Judas was the one who would act as an active traitor (Matthew 26:14–16), turning Jesus over to be killed (John 11:57). The rest of the twelve would not betray Him, but Jesus declares that they will "fall away." They will leave Him alone and run to save themselves (Matthew 26:56).
Christ adds that this event will be a fulfillment of written prophecy; it is part of God's sovereign plan for what is about to happen. He quotes from Zechariah 13:7 to make the point, noting how the flock of sheep will scatter when the shepherd is struck.
The connection between this moment and what is happening in the context of Zechariah 13 is complicated. Jesus' primary point is that He is the shepherd. His sheep—the disciples and His other followers—will scatter this night when He is "struck" by God the Father through what is about to happen.