Good question about Jesus’ baptism! There was no baptism in the Old Testament. After the Maccabees (163 BC), a group of priests contested the function of the High Priest and his colleagues in the Temple in Jerusalem and accused them of corruption. The group grew and settled outside of Jerusalem, south of Jericho and west of the Dead Sea, near a fresh spring of water. This group was known as the Essenes. The Essenes were known for their teaching, which can be summed up with the following five principles:
Because of the corruption in the Temple, Israel needed a serious healing which could be obtained by Repentance. The Only way to repent is to read, understand and live the Biblical Teaching. One of their first priorities was to learn the Bible by heart, copy, and send it to the different communities of Israel.
The Essenes considered themselves the sons of light. All others who didn't accept their teaching and adhere to their community were considered the sons of darkness, and an eternal war was going on between them.
They expected the Messiah to be a member of their Community because they considered themselves to be pure. They were pure because they practiced a ritual bath twice a day in a Miqvah (or Mikveh) inside their community and on the shores of the Jordan River, where they had fresh water and where other people could come.
Their teaching could be summed up in few words, "Repent because the Kingdom of God is at hand," which was the same teaching as John the Baptist.
They incited the Jewish people to join the resistance against the Roman occupation and prepare for the Messiah, who would set Israel free.
John, the forerunner, or the Baptist, was living in the same area, preached the coming of the Great Day of the Messiah, and practiced the same immersion (Baptism) in water. He said in Luke 3:16, “I baptize you with water. But one who is more powerful than I will come, the straps of whose sandals I am not worthy to untie. He will baptize you with the Holy Spirit and fire…” This is what Jesus said to Nicodemus in John 3:5, “Very truly I tell you, no one can enter the kingdom of God unless they are born of water and the Spirit…"