Actually he was baptized by John the Baptisthow did he get baptized he was physically being crucified on the cross by the Romans. That doesn't make any sense.. He got baptized by the Holy Spirit.
Matteüs 3
14 But John forbad him, saying, I have need to be baptized of thee, and comest thou to me? 15 And Jesus answering said unto him, Suffer it to be so now: for thus it becometh us to fulfil all righteousness. Then he suffered him. 16 And Jesus, when he was baptized, went up straightway out of the water: and, lo, the heavens were opened unto him, and he saw the Spirit of God descending like a dove, and lighting upon him: