Genesis 4:2-8

ISV(i) 2 And she did it again, giving birth to his brother Abel. Abel shepherded flocks and Cain became a farmer.
3 Later, after a while, Cain brought an offering to the LORD from the fruit that he had harvested, 4 while Abel brought the best parts of some of the firstborn from his flock. The LORD looked favorably upon Abel and his offering, 5 but he did not look favorably upon Cain and his offering.
When Cain became very upset and depressed, 6 the LORD asked Cain, “Why are you so upset? Why are you depressed? 7 If you do what is appropriate, you’ll be accepted, won’t you? But if you don’t do what is appropriate, sin is crouching near your doorway, turning toward you. Now as for you, will you take dominion over it?”
8 Instead, Cain told his brother Abel, “Let’s go out to the wilderness.” When they were outside in the fields, Cain attacked his brother Abel and killed him.