The IT expert was on a plane en route to Beirut, accompanied by Gen. Ibrahim Abbas, chief of Lebanon's General Security Directorate, an official in the Lebanese capital said on condition of anonymity.
Lebanese officials announced Mr Zakka's imminent release, only for Iranian judiciary officials to say it had not been confirmed.
Zakka, an information technology expert and permanent U.S. resident in Washington DC, disappeared in Tehran while attending a state-sponsored conference in September 2015.
In 2016, The Associated Press reported that Zakka's supporters wrote to then-Secretary of State John Kerry, stating Zakka traveled to Iran "with the knowledge and approval of the U.S. State Department, and his trip was funded by grants" from it.
Zakka told reporters that the initiative to release him was "born in Lebanon" and "100% a national" one, but he acknowledged that it served to de-escalate tensions between the USA and Iran.
Lebanese media reported that Zakka had been pardoned at the request of Lebanon's President, Michel Aoun.More news: Cricket taught me everything, says Yuvraj announcing retirement
More news: Nearly 100 killed in Mali massacre as ethnic violence escalates
More news: Transfer: Ex-Manchester United coach warns Solskjaer not to sign Bale
Zakka vanished in Iran in 2015 after attending a conference there.
His release comes as tensions between Washington and Tehran remain high after President Trump withdrew the United States from Iran's nuclear deal with world powers.
"The relevant court has agreed to Nizar Zakka's conditional release and he will be handed over to Lebanese authorities", Mizan Online quoted judiciary spokesman Gholamhossein Esmaili as saying. He is one of several prisoners with either dual nationality or links to the West held in Iran.
A top Lebanese security official is in Tehran to secure Zakka's release, which has been anticipated.
In April, Iran's Foreign Minister Mohammad Javad Zarif told Reuters he was proposing "serious dialogue" with Washington on a possible prisoner swap without saying if it would include Zakka.
He was arrested on the way to the airport and later sentenced to 10 years behind bars on espionage charges in a closed-door trial.