The main opposition Democratic Alliance (DA) went to court to force Zuma to explain the shock March 30 cabinet reshuffle in which Pravin Gordhan and his deputy removed were from their jobs.
Gordhan's axing was said to be based on an "intelligence" report that showed he was allegedly plotting against Zuma.
Judge Bashir Vally gave Zuma five days to provide the records.
Vally said Zuma must give "the record of all documents and electronic records...That relate to the making of the decisions."
More From This Section
The DA welcomed the court ruling, saying "it's high time that those in power and especially the president, are held accountable for their actions".
The party said Zuma "ought to have rationally foreseen the consequences of this reshuffle" including the credit downgrade of the country by ratings agencies.
The reshuffle caused the rand currency to plummet and the country's sovereign credit rating was downgraded to "junk status" by global agencies Standard & Poor's and Fitch.
It also triggered unprecedented criticism from within the ruling African National Congress top brass and its allies and spawned massive public protests for Zuma's ouster.
Gordhan was at loggerheads with Zuma for months, receiving support from several ministers and major foreign investors, as well as many ordinary South Africans.
Critics have stated that the fired ministers were replaced by perceived Zuma allies.