Videos posted on Twitter showed crowds gathered as curtains of flames raged through the top floor of the two-storey building in the central business district of the southeastern port city.
Several people took to social media to express sadness about the fire at the historic structure, which can accommodate up to 7,000 worshippers.
Firefighters managed to bring the fire under control in about two hours.
Emergency services spokesman Robert Mckenzie told AFP the blaze also damaged three adjacent buildings.
The mosque is a landmark of central Durban and a well-attended house of worship.
As well as hosting Friday prayers, it has been visited by prominent figures including anti-apartheid icon Nelson Mandela, British singer Yusuf Islam, formerly known as Cat Stevens, and boxing superstar Muhammad Ali.