‘Abdullāh ibn Mas‘ūd (may Allah be pleased with him) reported: I asked the Messenger of Allah (may Allah's peace and blessings be upon him): "Which sin is greatest?" He said: "That you set an equal to Allah while He alone created you." I said: "What is next?" He said: "That you kill your child lest he should share your food with you." I said: "What is next?" He said: "That you commit adultery with your neighbor's wife."
Explanation:
The Companions (may Allah be pleased with them) asked the Prophet (may Allah's peace and blessings be upon him) what the greatest sin was. He answered that it was major polytheism, which means associating partners with Allah in worship. It is the only sin which Allah does not forgive except through repentance. If a person dies in a state of polytheism, then he will dwell in Hellfire eternally. The second greatest sin, after polytheism, is for a person to kill his child out of fear that he would share his food. So, killing a soul unjustly comes second in terms of the gravity of sin. The sin multiplies when the slain person is a relative of the killer, and it multiplies even more if the motive is to prevent the slain from receiving the sustenance which Allah has decreed for him at the hands of the killer. The third greatest sin is for a man to commit adultery with his neighbor’s wife. Adultery is the third degree of grave major sins, but when it is committed with the wife of one’s neighbor, the sin becomes graver. This is because Islam orders us to be good to our neighbors and to treat them with kindness, benevolence, and good companionship.