The phrase fulfill the duty of a brother-in-law refers to the levirate marriage custom. The word levirate comes from a Latin word meaning “brother-in-law.”
When a married man died without a son, his brother was encouraged to marry the widow. He would father children in his brother’s name so that the dead man’s family line would continue. For examples of this custom, see Genesis 38:6–11; Ruth 3:12–13; 4:1–12; Luke 20:27–33.