Bashir, who is wanted over alleged war crimes, crimes against humanity and genocide in the Darfur conflict, mostly travels to countries that have not joined the ICC, but South Africa is a signatory of the court's statutes.
The Pretoria High Court said in a statement it was "compelling respondents to prevent President Omar Al-Bashir from the leaving the country until an order is made in this court".
Bashir joined a group photograph of leaders at the summit despite the calls for his arrest.
Wearing a blue suit, he stood in the front row for the photograph along with South African host President Jacob Zuma and Zimbabwe's President Robert Mugabe, who is the chair of the 54-member group.
More From This Section
Mugabe has previously urged African leaders to pull out of the ICC, which critics accuse of targeting Africa.
The ICC said in a statement from its headquarters in The Hague that it "calls on South Africa... To spare no effort in ensuring the execution of the arrest warrants" against Bashir.
Bashir, 71, seized power in Sudan in an Islamist-backed coup in 1989.
"South Africa has an obligation to arrest him," Johannesburg-based rights lawyer Gabriel Shumba told AFP.
"Failure to do so puts them in the same bracket as other African regimes who have no respect for human rights. It's actually a test for South Africa."
Darfur erupted into conflict in 2003 when insurgents mounted a campaign against Bashir's government, complaining their region was politically and economically marginalised.
Khartoum, however, disputes the figures, estimating the death toll at no more than 10,000.
"Allowing President al-Bashir into South Africa without arresting him would be a major stain on South Africa's reputation for promoting justice for grave crimes," said Elise Keppler of Human Rights Watch.