Habeel (Abel) and Qabeel (Cain) were two sons of Adam (AS). Adam (AS) had twins; a girl and a boy every time. Adam (AS) was ordered to marry the boy from one set of twins to the girl of the other set of twins, and marriage between girl and boy of the same set was not allowed.
Several Companions of Prophet (SAW) narrate that Habeel decided to get married to the sister of Qabeel, who was very good looking. Qabeel wanted to marry his own sister but it was not allowed. Adam (AS) ordered them both to offer sacrifice and told them the girl would be married to the person whose sacrifice was accepted by Allah.
Habeel was a shepherd, so he brought a well kept sheep for sacrifice. Qabeel was a farmer, but he brought inferior quality yield from his fields as a sacrifice. A flame from the sky came down and burnt Habeel’s sacrifice. It was a sign that Habeel’s sacrifice had been accepted by Allah. Qabeel flew into a rage on seeing this and threatened to kill Habeel; but Habeel remained calm.
“And (O Muhammad [SAW]) recite to them the story of the two sons of Adam [Hâbeel (Abel) and Qâbeel (Cain)] in truth; when each offered a sacrifice (to Allâh), it was accepted from the one but not from the other. The latter said to the former: “I will surely kill you.” The former said: “Verily, Allâh accepts only from those who are Al-Muttaqûn (the pious )” (27)
“If you do stretch your hand against me to kill me, I shall never stretch my hand against you to kill you, for I fear Allâh; the Lord of the ‘Alamîn (mankind, jinns, and all that exists).”(28)
“Verily, I intend to let you draw my sin on yourself as well as yours, then you will be one of the dwellers of the Fire, and that is the recompense of the Zâlimûn (polytheists and wrongdoers).” (29)
“So the Nafs (self) of the other (latter one) encouraged him and made fairseeming to him the murder of his brother; he murdered him and became one of the losers. “(30)
“Then Allâh sent a crow who scratched the ground to show him to hide the dead body of his brother. He (the murderer) said: “Woe to me! Am I not even able to be as this crow and to hide the dead body of my brother?” Then he became one of those who regretted.” (31)
A crow was sent who scratched the ground to show him how to dig the earth and to bury the dead body of his brother.