El Amrani, in a letter to African football associations, said he would be departing on Monday, but gave no reason for his decision.
The 37-year-old Moroccan had served as secretary general for the last six years.
Hayatou was deposed as Caf president 10 days ago at elections in Ethiopia, where six of his allies on the body's executive committee also lost their positions.
The 70-year-old Hayatou had served as president for 29 years.
New Caf president Ahmad is due to meet staff members in Cairo on Monday.