Black pupils at the private Pretoria Girls High say they have often been told to straighten their hair.
“Schools should not be used as a platform to discourage students from embracing their African identity,” Arts and Culture Minister Nathi Mthethwa tweeted in support.
The school has not yet commented.
The school’s code of conduct has a detailed list of rules about hair, but does not specifically mention the afro hairstyle, which some pupils say they are banned from having.
The minister also criticised the school over student complaints that they had been warned not to speak to each other in their own languages.
“It is unacceptable to ban students from speaking their African languages at school,” he wrote on Twitter.
White minority rule and legalised racism, known as apartheid, ended in South Africa in 1994.
Pretoria Girls High was founded in 1902 as a multi-racial school, according to its website, but was a whites-only institution during the apartheid era.
A petition calling for an end to racism at Pretoria High has gathered almost 15,000 signatures in 24 hours.
Photos of students protesting were widely shared on social media over the weekend, including several of girls proudly sporting afros.
The hashtag #StopRacismAtPretoriaGirlsHigh has been trending across the region on social media.
The government has responded by saying that it intends to toughen anti-racism laws.