RTÃ‰ reports that Mr Molloy, 24, had been detained along with two British citizens  for allegedly crossing into Iraq illegally.
Mr Molloy is from Ballylinan.
It was reported that he had been fighting with Kurdish forces opposing the so-called Islamic State group.
Mr Molloy is a former Royal Irish Regiment soldier.
Charlie Flanagan said arrangements were being put in place which should see Mr Molloy rejoined with his family in the coming days.
"I would like to thank all those who helped to make this early release happen," he added.
"My department will continue to provide consular assistance in this case."
Declan Molloy, Joshua's father, told RTÃ‰ that Mr Flanagan broke the news to him in a phone call late on Saturday night.
"We are all delighted here," he added.
"We are jumping with joy to know that he is out.
"You know that Christmas morning feeling, it's a bit like that, when you find your most sought-after present under the tree, the dream present. That's how we feel."
Mr Molloy spoke to his son on Sunday via Facebook and reported that he was "fine", but felt that he would need some time alone after his ordeal.
He has repeatedly stressed that his son is not a mercenary or a freedom fighter, and that he had travelled to Syria last year for humanitarian reasons.
The two British citizens, Jac Holmes from Bournemouth and Joe Ackerman from Halifax have also been freed in Iraq.
The three men were held for more than a week in a prison in the Kurdish city, Erbil.
The Irish Foreign Minister Charlie Flanagan has confirmed that County Laois man Joshua Molloy has been released from custody in Iraq.