He was born in 1841 in the village of Hirriyat Razna near Zagazig in the Sharqia Governorate, approximately 80 kilometres to the north of Cairo. ‘Urabi was the son of a village leader and one of the wealthier members of the community, which allowed him to receive a decent education. After completing elementary education in his home village, he enrolled at Al-Azhar University to complete his schooling in 1849. He entered the army and moved up quickly through the ranks, reaching lieutenant colonel by age 20. The modern education and military service of ‘Urabi, from a fellah, or peasant background, would not have been possible without the modernising reforms of Khedive Ismail, who had done much to eliminate the barriers between the bulk of the Egyptian populace and the ruling elite, who were drawn largely from the military castes that had ruled Egypt for centuries. Ismail abolished the exclusive access to the Egyptian and Sudanese military ranks by Egyptians of Balkan, Circassian, and Turkish origin. Ismail conscripted soldiers and recruited students from throughout Egypt and Sudan regardless of class and ethnic backgrounds in order to form a "modern" and "national" Egyptian military and bureaucratic elite class. Without these reforms, ‘Urabi's rise through the ranks of the military would likely have been far more restricted.
He was a galvanizing speaker. Because of his peasant origins, he was at the time, and is still today, viewed as an authentic voice of the Egyptian people. Indeed, he was known by his followers as 'El Wahid' (the Only One), and when the British poet and explorer Wilfrid Scawen Blunt went to meet him, he found the entrance of ‘Urabi's house was blocked with supplicants. When Khedive Tewfik issued a new law preventing peasants from becoming officers, ‘Urabi led the group protesting the preference shown to aristocratic officers (again, largely Egyptians of foreign descent). 'Urabi repeatedly condemned severe prevalent racial discrimination of Egyptians in the army. He and his followers, who included most of the army, were successful and the law was repealed. In 1879 they formed the Egyptian Nationalist Party in the hopes of fostering a stronger national identity.
He and his allies in the army joined with the reformers in February 1882 to demand change. This revolt, also known as the 'Urabi Revolt, was primarily inspired by his desire for social justice for the Egyptians based on equal standing before the law. With the support of the peasants as well, he launched a broader effort to try to wrest Egypt and Sudan from foreign control, and also to end the absolutist regime of the Khedive, who was himself subject to Anglo-French control under the rules of the Caisse de la Dette Publique. The Arab-Egyptian deputies demanded a constitution that granted the state parliamentary power. The revolt then spread to express resentment of the undue influence of foreigners, including the predominantly Turko-Circassian aristocracy.
‘Urabi was first promoted to Bey, then made under-secretary of war, and ultimately a member of the cabinet. Plans were developed to create a parliamentary assembly. During the last months of the revolt (July to September 1882), it was claimed that ‘Urabi held the office of Prime Minister of the hastily created common law government based on popular sovereignty. Feeling threatened, Khedive Tewfik requested assistance against ‘Urabi from the Ottoman Sultan, to whom Egypt and Sudan still owed technical fealty. The Sublime Porte hesitated in responding to the request.
The British were especially concerned that ‘Urabi would default on Egypt's massive debt and that he might try to regain control of the Suez Canal. Therefore, they and the French dispatched warships to Egypt to intimidate the nationalists. Tewfik fled to their protection, moving his court to Alexandria. The strong naval presence spurred fears of an imminent invasion (as had been the case in Tunisia in 1881); anti-Christian riots to break out in Alexandria on 12 June 1882. One month later, despite French demurral to participate in an open assault, the British warships in the harbor opened fire on the city's gun emplacements after the Egyptians ignored an ultimatum from Admiral Seymour to withdraw them peaceably. In September of that year a British army landed in Alexandria but failed to reach Cairo after being defeated at the Battle of Kafr El Dawwar. Another army, led by Sir Garnet Wolseley, landed in the Canal Zone and on 13 September 1882 they defeated ‘Urabi's army at the Battle of Tell El Kebir. From there, the British cavalry advanced on Cairo which surrendered without a shot being fired, as did ‘Urabi and the other nationalist leaders.