Numbers 31:30
And of the children of Israel’s half, thou shalt take one portion of fifty, of the persons, of the beeves, of the asses, and of the flocks, of all manner of beasts, and give them unto the Levites, which keep the charge of the tabernacle of the LORD.
The verse belongs to the account of dividing the spoil taken in war, a division directed by the Lord. From the half belonging to Israel, one out of every fifty persons and livestock was to be given to the Levites who kept the charge of the tabernacle and served there.
The word soul can refer to a human being or an animal, since the verse applies the term to both the people and the livestock captured in the battle with Midian. The larger passage records Israel's first taking of captives at Midian, where Israel slew the males and seized the women, children, flocks and herds. After Moses rebuked them for sparing the grown women, they spared only the virgins and children. These were reserved to be adopted into the families of the nation rather than enslaved, which shows that God prohibited rather than sanctioned the enslavement of prisoners of war and did not intend Israel to become a slaveholding nation.