You may be thinking of the event we find in Genesis 38:6-8, “And Judah took a wife for Er his firstborn, whose name was Tamar. And Er, Judah’s firstborn, was wicked in the sight of the LORD; and the LORD slew him. And Judah said unto Onan, Go in unto thy brother’s wife, and marry her, and raise up seed to thy brother.”  This reflects the scriptural principal that was taught in Deuteronomy 25:5, “If brethren dwell together, and one of them die, and have no child, the wife of the dead shall not marry without unto a stranger: her husband’s brother shall go in unto her, and take her to him to wife, and perform the duty of an husband’s brother unto her.”

Under Moses’ Law, if a man died before he and his wife had a child, the next brother in line was to marry his brother’s widow in order to provide an heir to his brother’s estate.  This was a strong and viable option to keep the inheritance in the family.  Of course, the younger brother must still be unmarried in order to marry his older brother’s widow.  Having relations with a living brother’s wife was strongly condemned.  Leviticus 18:16 says, “Thou shalt not uncover the nakedness of thy brother’s wife: it is thy brother’s nakedness.” 

To have sex with your brother’s widow without being married to her would be fornication and that is always condemned in the scriptures.  The definition of fornication is “voluntary sexual intercourse between persons not married to each other.”  Hebrews 13:4 instructs us, “Marriage is to be held in honor among all, and the marriage bed is to be undefiled; for God will judge the sexually immoral and adulterers.” (NASB).  You did not state if you are married, but sex outside of marriage is sin and is defiling to the institution of marriage! 

You seem to be concerned that your brother’s widow may not be able to control herself and would seek someone to engage in a sexual relationship with.  For you to sleep with her would be just as great a sin as would any other man sleeping with her apart from marriage. 

Let us consider the words of 1 Corinthians 7:8-9, “But I say to the unmarried and to widows that it is good for them if they remain even as I. But if they do not have self-control, let them marry; for it is better to marry than to burn with passion.” (NASB).  Here, those who were not married, and those who were widowed were encouraged by Paul to remain unmarried.  However, the gift of remaining single has not been given to everyone.  If one who is single, or one who has been widowed has a desire for a companion and the relationship of marriage, then it is certainly better to marry than to burn with lust for a mate.  Paul goes on to say in verse 28, “But and if thou marry, thou hast not sinned…” 

In no situation would it be appropriate for you to carry on a sexual relationship with your brother’s widow unless the Lord led you to marry each other.  If you are married already, then you are to remain faithful to your wife.  I encourage you to pray for your sister-in-law and ask the Lord to guide her as to remaining single or to seeking another mate.  (458.2)