The Slovak-born Babis was suing Slovakia's Institute of the Nation's Memory, which holds parts of his secret-police files because Czechoslovakia divided into the Czech Republic and Slovakia in 1993.
Some of the files had been destroyed but the institute said 12 of them that survived contain evidence that Babis was an agent under a code name "Bures."
Babis denies that, and Slovak courts previously ruled that there was no proof for the allegation.
But Slovakia's Constitutional Court ordered Bratislava's regional court last year to look again at the case, at the institute's request.
The Constitutional Court said there are doubts about the trustworthiness of the witnesses on whose testimonies the previous verdicts were based because they were former secret police officials. The court also cited procedural mistakes.
The verdict in the case is final.
In response to the verdict, Babis said Tuesday that his lawyers are considering what further steps to take.
Babis' centrist ANO (YES) movement won October's general election in the Czech Republic but his minority government failed to win a mandatory confidence vote in Parliament last month and had to resign.
Czech President Milos Zeman has asked Babis to try again to form a new government. His office said on Tuesday that the court's ruling will not change Zeman's decision.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.