Exodus 2:12 (ESV)

12 He looked this way and that, and seeing no one, he struck down the Egyptian and hid him in the sand.

Moses acted in faith. Read Hebrews 11:26: He considered the reproach of Christ greater wealth than the treasures of Egypt, for he was looking to the reward. The writer of the letter to the Hebrews shows that the disgrace of Israel in Egypt, the disgrace of Jesus’ suffering, and the disgrace of the Christians now (see Hebrews 10:32–34) are the same movement of the devil against the redemption God gives in Jesus. The oppression of Israel in Egypt is a foreshadowing of Jesus’ suffering. God shows he saves his people - only Christ had to suffer without the saving hand of God. We as children of God are the reward that Jesus was keeping in mind while walking the path of suffering.