JOHANNESBURG—South Africa’s former President Jacob Zuma appeared in court Friday on corruption charges linked to a decades-old arms deal, kicking off what is expected to be a lengthy court battle that will test the resilience of the ruling African National Congress.

Mr. Zuma looked somber as he sat in the dock in the High Court in Durban, a coastal city​in the province where he was born​that remains a stronghold of support for a man who governed Africa’s most developed economy for nearly a decade.

Outside the courthouse, hundreds of his supporters rallied to his defense, some wearing yellow, black and green T-shirts bearing his image, in defiance of orders from ANC leaders not to don the party’s colors during the proceedings.

Friday’s hearing, which was called for Mr. Zuma to formally face charges, lasted just 20 minutes, after which the judge postponed the proceedings until June 8.

For many South Africans, Mr. Zuma’s long-delayed day in court is a crucial test of their country’s institutions and rule of law.