This reverses a not guilty verdict passed in August which saw Martinelli released from house arrest and absolved of the charges, which also included embezzlement and seizure of public funds.
According to Prosecutor Ricuarte Gonzalez, the appeals court ordered a retrial for the espionage charges only. The case accuses Martinelli of spying on some 150 politicians, journalists and union leaders while in office between 2009 and 2014.
"The Supreme Court of Appeal, by a majority vote, accepted the appeal to overturn the verdict in the case of wiretapping and ordered a new trial at the request of the plaintiffs' lawyers and the prosecutor's office", Gonzalez said in a video statement published on Friday.
The court found that the previous verdict was reached with a faulty consideration of the evidence, Gonzalez explained. A three-judge panel in August had ruled that the prosecution failed to prove the facts of espionage.
In July, Martinelli’s two sons were arrested in Guatemala at the behest of the United States on suspicion of bribery and money laundering linked to Brazilian construction firm Odebrecht.