Jana Necasova, formerly Jana Nagyova, was charged along with two former heads of the military intelligence agency, Ondrej Palenik and Milan Kovanda, and intelligence agent Jan Pohunek.
Prosecutors charged that Nagyova then Necas' chief of staff and mistress ordered the military intelligence agency to spy on Necas' estranged wife in 2012 to gain personal information about her.
They said such activities would need court approval or would have to be approved by the government or the president.
Judge Helena Kralova of the Prague 1 district court ruled that they didn't commit a crime. Kralova didn't immediately explain her decision, saying it included classified information. Most of the trial was held behind closed doors.
Also Read
The verdict is not final, as the prosecution immediately appealed.
After his government fell in June 2013 in a spectacular whirlwind of corruption and marital infidelity allegations, Necas admitted his affair with Nagyova and divorced his first wife.
Necas was a witness in the case he previously described as "a political process."