Why was Imam Ali (عليه السلام) named Amir al-Momineen (عليه السلام)

Hadith 1:

الْحُسَيْنُ بْنُ مُحَمَّدٍ عَنْ مُعَلَّى بْنِ مُحَمَّدٍ عَنِ الْوَشَّاءِ عَنْ أَحْمَدَ بْنِ عُمَرَ قَالَ سَأَلْتُ أَبَا الْحَسَنِ (عَلَيْهِ السَّلام) لِمَ سُمِّيَ أَمِيرَ الْمُؤْمِنِينَ (عَلَيْهِ السَّلام) قَالَ لانَّهُ يَمِيرُهُمْ الْعِلْمَ أَ مَا سَمِعْتَ فِي كِتَابِ الله وَنَمِيرُ أَهْلَنا. 

وَفِي رِوَايَةٍ أُخْرَى قَالَ لانَّ مِيرَةَ الْمُؤْمِنِينَ مِنْ عِنْدِهِ يَمِيرُهُمُ الْعِلْمَ

Narrated that Abu al-Hasan Imam Musa al-Kazim (عليه السلام) was asked,

"Why was Imam Ali (عليه السلام) named Amir al-Momineen (عليه السلام)?

Imam Kazim (عليه السلام) said, "Because He provided (Mayr) knowledge (ilm). Have you not heard in the book of Allah, "And we will get provision/food (Mayr) for our family." (12:65)

And in another narration it is said, "The reason being that the provisions of the believers is from Imam Ali (عليه السلام), He provided them knowledge"

[Source: al-Kafi, Vol. 1, Pg. 412]

Note: In the above hadith, Imam Kazim (عليه السلام) has derived the meaning from the root word "مير - Mayr" which means "to provide"


Hadith 2:

حَدَّثَنا جَعفَرُ بنُ مُحَمَّدِ بنِ مَسرورٍ رحمه الله، قالَ: حَدَّثَنَا الحُسَينُ بنُ مُحَمَّدِ بنِ عامِرٍ، عَن عَمِّهِ عَبدِ اللَّهِ بنِ عامِرٍ، عَنِ ابنِ أبي عُمَيرٍ، عَن حَمزَةَ بنِ حُمرانَ، عَن أبيهِ، عَن أبي حَمزَةَ، عَن عَلِيِّ بنِ الحُسَينِ، عَن أبيهِ، عَن أميرِ المُؤمِنينَ (صَلَواتُ اللَّهِ عَلَيهِم) أنَّهُ جاءَ إلَيهِ رَجُلٌ، فَقالَ لَهُ: يا أبَا الحَسَنِ، إنَّكَ تُدعى‌ أميرَ المُؤمِنينَ، فَمَن أمَّرَكَ عَلَيهِم؟ قالَ عليه السلام

اللَّهُ جَلَّ جَلالُهُ أمَّرَني عَلَيهِم. فَجاءَ الرَّجُلُ إلى‌ رَسولِ اللَّهِ صلى الله عليه و آله فَقالَ: يا رَسولَ اللَّهِ، أيَصدُقُ عَلِيٌّ فيما يَقولُ: إنَّ اللَّهَ أمَّرَهُ عَلى‌ خَلقِهِ؟

فَغَضِبَ النَّبِيُّ صلى الله عليه و آله وقالَ: إنَّ عَلِيّاً أميرُ المُؤمِنينَ بِوِلايَةٍ مِنَ اللَّهِ عز و جل، عَقَدَها لَهُ فَوقَ عَرشِهِ، وأَشهَدَ عَلى‌ ذلِكَ مَلائِكَتَهُ

إنَّ عَلِيّاً خَليفَةُ اللَّهِ، وحُجَّةُ اللَّهِ، وإنَّهُ لَإِمامُ المُسلِمينَ، طاعَتُهُ مَقرونَةٌ بِطاعَةِ اللَّهِ، ومَعصِيَتُهُ مَقرونَةٌ بِمَعصِيَةِ اللَّهِ، فَمَن جَهِلَهُ فَقَد جَهِلَني، ومَن عَرَفَهُ فَقَد عَرَفَني، ومَن‌ أنكَرَ إمامَتَهُ فَقَد أنكَرَ نُبُوَّتي، ومَن جَحَدَ إمرَتَهُ فَقَد جَحَدَ رِسالَتي، ومَن دَفَعَ فَضلَهُ فَقَد تَنَقَّصَني، ومَن قاتَلَهُ فَقَد قاتَلَني، ومَن سَبَّهُ فَقَد سَبَّني، لِأَنَّهُ مِنّي، خُلِقَ مِن طينَتي، وهُوَ زَوجُ فاطِمَةَ ابنَتي، وأَبو وَلَدَيَّ الحَسَنِ وَالحُسَينِ

ثُمَّ قالَ صلى الله عليه و آله: أنَا وعَلِيٌّ وفاطِمَةُ، وَالحَسَنُ وَالحُسَينُ، وتِسعَةٌ مِن وُلدِ الحُسَينِ، حُجَجُ اللَّهِ عَلى‌ خَلقِهِ، أعداؤُنا أعداءُ اللَّهِ، وأَولِياؤُنا أولِياءُ اللَّهِ

Narrated from Ali ibn al-Husayn (عليه السلام), from his Father, from Amir al-Momineen (عليه السلام):

That a man came to Imam Ali (عليه السلام) and said to Him, O Abu al-Hasan (عليه السلام), You are called Amir al-Momineen (ع); so, who appointed You as authority over the believers?

Imam Ali (عليه السلام) said, "Allah appointed Me over them."

So, the man came to the Messenger of Allah (صلى الله عليه وآله) and said, "O Messenger of Allah (ص), is Ali (عليه السلام) saying the truth when He says that Allah appointed Him as authority over His creation?"

So The Prophet (صلى الله عليه وآله) got angry, and He said, "Surely, Ali (عليه السلام) is the Amir al-Momineen through the guardianship (Wilayah) from Allah, Allah awarded it to Him above His Throne and made His angels as a witness upon it."

And that Ali (عليه السلام) is the vicegerent of Allah (خليفة الله) and the Proof (Hujjah) of Allah and that he is the leader (Imam) of the Muslims. His obedience is coupled with the obedience of Allah and His disobedience is coupled with the disobedience of Allah.

So, whoever is ignorant about Him, he is ignorant about Me and whoever recognised Him, indeed he has recognised Me.

And whoever denied His Imamate, he has denied My prophethood and whoever denied His authority has denied My messengership.

And whoever refuted His superiority, he has lowered Me and whoever fights with him He has fought with Me.

And whoever insulted Him he has insulted Me, for He is from Me, created from My clay and he is the husband of Fatima (عليها السلام) - My daughter, and the father of my sons, al-Hasan (عليه السلام) and al-Husayn (عليه السلام).

Then he (s) said, Surely, I and Ali (ع) and Fatimah (ع) and al-Hasan (ع) and al-Husayn (ع) and nine from the sons of Husayn (ع) are the Proofs (Hujjah) of Allah upon His creation. Our enemies are the enemies of Allah and Our friends are the friends of Allah."

[Source: al-Amali, Shaikh Sadooq, Assembly No. 27, Hadith. 8]