Hannah said to Eli in 1 Samuel 1:
No. In fact, Israelites were commanded to redeem their firstborns by paying five shekels of silver, Numbers 18:
There was another case in Numbers 31. Moses fought against the Midianites. After the war, Moses gave some of the plunder to the Levites:
Was it common for parents to leave their children in the temple?27 "I prayed for this child, and the Lord has granted me what I asked of him. 28 So now I give him to the Lord. For his whole life he will be given over to the Lord.” And he worshiped the Lord there.
No. In fact, Israelites were commanded to redeem their firstborns by paying five shekels of silver, Numbers 18:
Further, only the sons of Levi were allowed to approach the Tent of Meeting:15 The first offspring of every womb, both human and animal, that is offered to the LORD is yours. But you must redeem every firstborn son and every firstborn male of unclean animals. 16When they are a month old, you must redeem them at the redemption price set at five shekels of silver, according to the sanctuary shekel, which weighs twenty gerahs.
The case of Samuel was special. He was appointed as a prophet of the Lord. God did it in this case because Eli's sons were wicked. Generally speaking, Israelites were discouraged from ministering in the holy services.21“I give to the Levites all the tithes in Israel as their inheritance in return for the work they do while serving at the tent of meeting. 22 From now on the Israelites must not go near the tent of meeting, or they will bear the consequences of their sin and will die. 23 It is the Levites who are to do the work at the tent of meeting and bear the responsibility for any offenses they commit against it. This is a lasting ordinance for the generations to come.
There was another case in Numbers 31. Moses fought against the Midianites. After the war, Moses gave some of the plunder to the Levites:
47 From the Israelites’ half, Moses selected one out of every fifty people and animals, as the LORD commanded him, and gave them to the Levites, who were responsible for the care of the LORD’s tabernacle.