No casualties have been reported in the fire, the Cairo Governorate said in a statement carried by local media.
An investigation led by Egypt's Public Prosecution Office determined that the fire was caused by an electrical short-circuit, the office said in a statement late on Saturday.
The fire occurred only days after the employees of the ministry, or Awqaf, had moved to premises in a new capital city under construction in the desert 45km east of Cairo.
Cairo Governor Khaled Abdel Aal said civil protection forces had put out the fire and were working to prevent it from reigniting.
The governor ordered the formation of a committee to check on the condition of the building after the fire.
The fire appeared mainly confined to the top floor of the Awqaf building, although flames were seen shooting out of a second-floor window as well, according to Reuters.
At least seven fire trucks were deployed, and after several hours the fire was largely extinguished.
The main part of the building was built in 1898, with wings added on either side in 1912 and 1927. Most of the ministry's employees moved to the new capital, away from the clutter and chaos of Cairo, in late July.
Some former ministry buildings are to be repurposed under Egypt's Sovereign Fund, a process the government hopes will draw badly needed investment and help regenerate central Cairo.