He later served in Egypt during the Mahdist War where his brother Lord Kitchener was commanding British forces. During the war Frederick was made director of Transport during the 1898 Nile expedition and advance on Khartoum. He was appointed commander of the Kordofan force and took part in the Battle of Omdurman which resulted in the recapture of Khartoum which had been captured by Mahdist's during the Siege of Khartoum in 1885. He was appointed Khartoum's Military governor after it came under Anglo-Egyptian control.