Deuteronomy 21:16

New American Standard Bible (NASB)
then it shall be in the day he [n]wills what he has to his sons, he cannot make the son of the loved the firstborn before the son of the [o]unloved, who is the firstborn.

Read Deuteronomy 21:16 in other translations