SAFM radio said Feroze Adams, a social worker in Worcester prison in the Western Cape province, was dismissed for having "violated the corporate identity of the department of correctional services."
Eddy Johnson, spokesman for the regional chapter of the department, said Adams had been "summoned to a disciplinary hearing at which she was then found guilty of violating the dress code."
Johnson said Adams had the option of appealing her dismissal.
Muslims form about 1.5 percent of South Africa's estimated 45-million-plus population and are the second dominant religious group after Christians who account for some 80 percent. They are an influential religious group.
More than 15 percent South Africans do not follow any religion.