Deuteronomy 21:16

Amplified Bible (AMP)
then on the day when he wills his possessions to his sons, he cannot treat the son of his loved wife as firstborn in place of the son of the unloved wife—the [actual] firstborn.

Read Deuteronomy 21:16 in other translations