Deuteronomy 15:13-23

13 And when you send a male slave out from you a free person, you shall not send him out empty-handed.
14 Provide liberally out of your flock, your threshing floor, and your wine press, thus giving to him some of the bounty with which the Lord your God has blessed you.
15 Remember that you were a slave in the land of Egypt, and the Lord your God redeemed you; for this reason I lay this command upon you today.
16 But if he says to you, "I will not go out from you," because he loves you and your household, since he is well off with you,
17 then you shall take an awl and thrust it through his earlobe into the door, and he shall be your slave forever. You shall do the same with regard to your female slave.
18 Do not consider it a hardship when you send them out from you free persons, because for six years they have given you services worth the wages of hired laborers; and the Lord your God will bless you in all that you do.
19 Every firstling male born of your herd and flock you shall consecrate to the Lord your God; you shall not do work with your firstling ox nor shear the firstling of your flock.
20 You shall eat it, you together with your household, in the presence of the Lord your God year by year at the place that the Lord will choose.
21 But if it has any defect—any serious defect, such as lameness or blindness—you shall not sacrifice it to the Lord your God;
22 within your towns you may eat it, the unclean and the clean alike, as you would a gazelle or deer.
23 Its blood, however, you must not eat; you shall pour it out on the ground like water.