Kabil envied Habil and killed him.

According to reliable chain of narrators Sulayman ibn Khalid said to Ja‘far as-Sadiq, “May I be sacrificed for you, people says that Adam married his sons to his daughters?” Imam said, “Yes people do say that, but O Sulayman, you might not know that Holy Prophet said, ‘If Adam had married his daughters to his sons then certainly would have married Zaynab to Qasim without having left the religion of Adam.’”
Sulayman said, “May I be sacrificed on you, they say that Qabil killed Habil because Habil was ashamed that his sister was being given to Habil. Imam said, “O Sulayman! You also attribute such filthy things to Adam and do not feel ashamed?” He said, “May I be sacrificed on you. What was the reason that Qabil killed Habil?” Imam replied, “Because Adam had appointed Habil as his successor. Allah revealed to Adam to hand over the successorship and the Grand Name to Habil while Qabil was elder. When he knew this, he was angry and said that he was the rightful heir to successorship and bounties. Under divine instructions, Adam asked both of them to present a sacrifice to Allah. Allah accepted Habil’s sacrifice and rejected Qabil’s. So he envied Habil and killed him.”