Gareth Cliff was sacked by M-Net TV after appearing to cite "freedom of speech" as a defence for comments made by a white South African woman, who had referred to black people as "monkeys" in a widely shared Facebook post.
Auditions for the new season of Idol are due to start in Durban on Saturday.
M-Net has not commented on the ruling.
There have been several high-profile rows over racism on social media in South African in recent months.
The case at the high court in Johannesburg did not deal directly with Mr Cliff's comments, but on whether he had a contract with M-Net.
Judge Caroline Nicholls found that there was a binding contract between the media personality and the pay-TV channel.
In 2002, Idols was forced to defend itself against accusations of racial prejudice, after a white South African won the first series, despite commentators saying that he was a less talented singer than other black contestants on the show.
Apartheid, which legally enforced a racial hierarchy privileging white South Africans, ended in 1994 with the election of the country's first democratic government.
A judge on one of South Africa's biggest TV talent shows, sacked in a row over racism, is to be reinstated after a court ruled in his favour.