This story is found in the book of Numbers:
21:5 And the people spake against God, and against Moses, Wherefore have ye
brought us up out of Egypt to die in the wilderness? for [there is] no bread, neither [is there any]
water; and our soul loatheth this light bread.
21:6 And the LORD sent fiery serpents among the people, and they bit the people; and much
people of Israel died.
21:7 Therefore the people came to Moses, and said, We have sinned, for we have spoken against
the LORD, and against thee; pray unto the LORD, that he take away the serpents from us. And Moses
prayed for the people.
21:8 And the LORD said unto Moses, Make thee a fiery serpent, and set it upon a pole: and it
shall come to pass, that every one that is bitten, when he looketh upon it, shall live.
21:9 And Moses made a serpent of brass, and put it upon a pole, and it came to pass, that if
a serpent had bitten any man, when he beheld the serpent of brass, he lived.