The South African government has a week to explain to judges why it defied a court order barring the Sudanese President Omar al-Bashir from leaving the country.
Bashir flew out of South Africa on Monday, before the end of the African leaders summit, despite an earlier ruling blocking him from leaving.
A court Monday ordered the government to disclose why he was allowed to leave, in a ruling criticised the authorities action as not consistent with the constitution.
Bashir, who is wanted by the International Criminal Court (ICC) for genocide and crimes against humanity in Darfur, arrived in South Africa on Saturday to attend the African Union summit, prompting a court bid by a rights group to have him arrested.
The South African government said in a statement they would investigate the circumstance surrounding Bashir's departure through a military base.
"We will also comply with the court order relating to submission of an affidavit outlining these circumstances," it said in a statement.
South Africa is a signatory of The Hague-based ICC and has come under global criticism for failing to arrest Bashir, who has evaded justice since his indictment in 1999.
UN chief Ban Ki-moon said the arrest warrant was "a matter I take extremely seriously and the authority of the ICC must be respected."
The ICC indictments relate to the western Sudanese region of Darfur, which erupted into conflict in 2003 when black insurgents rose up against Bashir's Arab-dominated government, complaining of marginalisation.
Since his indictment, Bashir has mostly travelled to countries that have not joined the ICC.
South Africa rights group, the Southern African Litigation Centre, which led the court action, threatened to take further legal action against the state over its handling of the case.