Then Allāh sent a crow searching [i.e., scratching] in the ground to show him how to hide the disgrace of his brother. He said, "O woe to me! Have I failed to be like this crow and hide the disgrace [i.e., body] of my brother?" And he became of the regretful.
Allah describes the evil end and consequence of transgression, envy and injustice in the story of the two sons of Adam, Habil and Qabil. One of them fought against the other and killed him out of envy and transgression, because of the bounty that Allah gave his brother and because the sacrifice that he sincerely offered to Allah was accepted. The murdered brother earned forgiveness for his sins and was admitted into Paradise, while the murderer failed and earned a losing deal in both the lives. Allah said,
(And recite to them the story of the two sons of Adam in truth;) meaning, tell these envious, unjust people, the brothers of swine and apes from the Jews and their likes among mankind, the story of the two sons of Adam, Habil and Qabil, as many scholars among the Salaf and later generations said. Allah's statement,
In these verses, Allah Ta` a1a has instructed the Holy Prophet ﷺ that he should relate the story of the two sons of Adam truthfully to the people of the Book, or to the whole Ummah.
People who are blessed with insight into the Holy Qur'an know that it is no book of folklore, fiction or history where the purpose is to relate an event from the beginning to the end. But, events of the past and accounts of earlier peoples carry many lessons and wise counsels within their fold. That is the real essence of history. Then, in them, there are such conditions and circumstances as form the basis of different religious injunctions. In view of these very beneficial considerations, the Qur'an employs a methodology of its own throughout the text. It would, when the occasion warrants, narrate an event. Most of-ten, it would not narrate the whole event in one sequence and at one place. In fact, preference is given to narrating a particular segment from it which bears some element of purpose and is relevant at the given place.
Whatever a man receives in this world is bestowed by God. Therefore, one who, out of being jealous inflicts harm upon another who is better situated in life attempts, in effect, to nullify God’s plan. Such a person is to some extent given the scope to do whatever he likes in this world of trial, but in the eyes of God, he is the worst sinner. Abel drew the attention of his elder brother Cain to this fact. This created some hesitation in Cain’s mind. He realised that if he was bent on killing his younger brother, it was without any justification. But the feeling of jealousy in him did not cool down. He invented excuses to justify his action. Ultimately, his inner struggle resolved itself by returning to his self-devised justification and he proceeded to kill his brother. The voice of conscience is the voice of God. A question arising in a man’s conscience about any action of his amounts in fact to his facing a test. A man is successful if he gives a positive response to the voice of his conscience, but if, in taking the shelter of false excuses, he suppresses the voice of his conscience, then he has failed. It has been recorded in a tradition of the Prophet that transgression and the killing of kindred are sins for which punishment starts right here in this world. The punishment for the unjustified atrocity committed by Cain against his brother was given to him not only in the Hereafter but in this very world where he was immediately plunged into misery. It has come to us through Mujahid that Cain, after committing the murder, was afflicted by his lower leg becoming stuck to his thigh. He remained lying on the ground, unattended and uncared for, until he died in ignominy and distress. (Tafsir ibn Kathir). Cain was instructed by means of a crow how to bury the dead body under the ground. This points to the fact that man was less knowledgeable than the animals about the ways of nature. And, if he follows his emotions, there is no worse transgressor than he. Furthermore, it is implied that if, rather than committing a crime, a man buries the intention in his heart, he will not have to face the shame of it afterwards. A man should curb and bury his bad intentions in his heart and not allow them to emerge and become a reality. A man, before bringing his evil designs to fruition, has simply to bury the intention. If, not, he will be confronted with the problem of burying the dead body, which, even after burial, will be treated by God as not having been buried.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.