Born in Asyut, al-Hilali graduated from Khedival Law School and began his career in the Niyaba. He was appointed as a professor in 1923, rising to secretary-general of the Ministry of Public Instruction. He became a royal advisor on education and served as Education Minister under Muhammad Tawfiq Nasim Pasha from 1934 to 1936. He joined the Wafd Party in 1938 and served in the Cabinet of Mustafa al-Nahhas in 1937 to 1938 and in his second Cabinet from 1942 to 1944. His publications on education reform paved the way for reforms, including free universal public education in Egypt, day care, earlier entrance to school and longer compulsory education. The University of Alexandria opened while he served. al-Hilali became chancellor of the Niyaba in 1931.
al-Hilali broke from the Wafd Party in 1951. He served as Prime Minister for 4 months in 1952 immediately following the 1952 Cairo Fire. He also served as Prime Minister for one day before the Egyptian Revolution of 1952. He was briefly imprisoned and was thereafter banned from politics. He died one month after his wife in Maadi.