Fahmi graduated from military academy.
After graduation, Fahmi joined the Egyptian army and later, he became a Lieutenant general. He retired from the army and began to serve as a governor in different provinces, including Minuffiyya, Cairo and lastly, Portuguese Said. After serving in other low-profile public positions, he was appointed minister of public works in 1879.
Then Fahmi served at different cabinet positions: minister of foreign affairs, minister of justice, minister of finance, minister of interior (three times) and minister of war and marine (two times).
Fahmi was appointed prime minister on 12 May 1891, replacing Riaz Pasha. Fahmi remained in office for nearly two years and was sacked by Abbas II on 15 January 1893.
The King dismissed him due to his over reliance on the British agency. Hussein Fahri Pasha replaced Fahmi Pasha as prime minister.
Fahmi"s second appointment as prime minister was on 12 November 1895, replacing Nubar Pasha.
Fahmi Pasha"s second term lasted until 12 November 1908, and Boutros Ghali replaced him as prime minister. Fahmi"s daughter, Safiya, was a political activist and a significant figure in the Egyptian society. Fahmi died in Cairo on 13 September 1914.