This story is found in John 3:1-21. Nicodemus was a Pharisee, a teacher of the law. He also was a wealthy man who would have had social status and influence in the Jewish community. Faithful Jews embraced the Abrahamic promise, “In thee and thy seed shall all the families of the earth be blessed.” (Genesis 28:14) They were eagerly looking for the Messiah to establish His earthly kingdom through Israel. Even the apostles at Jesus’ ascension into heaven asked, “Lord, will You at this time restore the kingdom to Israel?” (Acts 1:6) Thus, Nicodemus wished to learn more about how Jesus was going to establish the kingdom of God.
The Jews knew that in their day the 70 weeks prophecy in Daniel 9:24-27 was being fulfilled. This prophecy predicted the time of the first advent of our Lord. Therefore, they were actively looking for someone who might declare himself as the promised Messiah. “Now the people were waiting expectantly, and all of them were questioning in their hearts whether John might be the Messiah,” Luke 3:15 (CSB).
Nicodemus was hoping that Jesus was this Messiah. But he wondered how Jesus would establish His rule. Therefore, before he might give Jesus his public support, he asked Jesus how to enter God’s kingdom. (John 3:5) Nicodemus would have needed courage to openly recognize Jesus since many of the Pharisees opposed our Lord. So he talked with Jesus at night when others would not know of this conversation.
Later, Nicodemus did publicly recognize Jesus as Messiah. After Jesus’ death, the apostle John records,“And Nicodemus, who at first came to Jesus by night, also came, bringing a mixture of myrrh and aloes, about a hundred pounds,” John 19:39 (NKJV).