´It was narrated from Abu Musa that the Messenger of Allah (ﷺ) said:` “When two Muslims confront one another with their swords, both the killer and the slain will be in Hell.” They said: “O Messenger of Allah, (we understand about) this killer, but what is wrong with the one who is slain?” He said: “He wanted to kill his companion.’”
Benefits and Issues: ➊ When a person makes every effort to commit a crime but, due to some reason, is not able to succeed, then in the sight of Allah, he is still considered a criminal.
➋ Whoever intends to commit a crime but repents before actually committing it, his sin is forgiven and, due to his repentance, he becomes deserving of reward.
Source: Commentary on Sunan Ibn Mājah by Mawlānā ‘Atā’ullāh Sājid, Page: 3964