מִצְוַת עֲרִיפַת פֶּטֶר חֲמוֹר – לַעֲרֹף פֶּטֶר חֲמוֹר אִם לֹא רָצָה לִפְדּוֹתוֹ, שֶׁנֶּאֱמַר (שמות יג יג) וְאִם לֹא תִפְדֶּה וַעֲרַפְתּוֹ. עִנְיָנָהּ, שֶׁהוֹרֵג וְלַד הַחֲמוֹר אִם לֹא רָצָה לִפְדּוֹתוֹ, וְגָזַר הַשֵּׁם שֶׁלֹּא יֵהָנֶה בּוֹ, מִכֵּיוָן שֶׁלֹּא פָּדָהוּ, וַאֲפִילּוּ הַנְּבֵלָה אֲסוּרָה לוֹ בַּהֲנָאָה. The commandment of beheading a [firstborn] donkey: To behead a [firstborn] donkey, if he does not want to redeem it, as it is stated (Exodus 13:13), “and if you do not redeem it, you shall behead it.” Its content is that he kills the offspring of the donkey if he does not want to redeem it. And God decreed that he should not benefit from it, since he did not redeem it. And [this is such] that it is even forbidden for him to benefit from the carcass.
מִשָּׁרְשֵׁי מִצְוָה זוֹ. מָה שֶׁכָּתוּב בַּפְּדִיָּה. That which is written regarding redemption (in the previous commandment) is from the roots of this commandment.
דִּינֵי הַמִּצְוָה, מָה שֶׁאָמְרוּ (בכורות יג, א) דְּמִצְוַת פְּדִיָּה קוֹדֶמֶת לָעֲרִיפָה, וְשֶׁאָסוּר בַּהֲנָאָה אִם מֵת קֹדֶם פִּדְיוֹן וְיִקָּבֵר, וְכִי מִצְוָה לְהָרְגוֹ בְּקוֹפִיץ וְלֹא בְּדָבָר אַחֵר. וְיֶתֶר פְּרָטֶיהָ מְבֹאָרִים גַּם כֵּן בִּבְכוֹרוֹת (שם בי"ד). וְנוֹהֶגֶת בַּכֹּל כְּמוֹ הַפְּדִיָּה. The laws of the commandment — that which they said (Bekhorot 13a) that the commandment of redemption takes precedence over beheading; that it is forbidden to benefit from it if it dies before the redemption and that it should [then] be buried; so [too,] that he should kill it with a kofits (a large knife), and not with something else; and the rest of its details — are elucidated in Bekhorot. (See Tur, Yoreh Deah 221.) And it is practiced like the redemption regarding everything.