Several gas cylinders had been allegedly set alight inside Conditsis and Associates, causing doors to blast off their hinges and thick smoke and flames to engulf the building.
It left the 20 staff inside at the time scrambling for safety.
Police alleged Middleton set off the homemade explosives inside the law firm, which had previously represented him, after they cut ties with him as a client.
Conditsis and Associates said staff had been left traumatised.
“The incident was traumatic for all our staff and we are so grateful that no one was seriously physically injured or worse – it was a miracle,” Conditsis and Associates’ director Manny Conditsis said in a statement.
The Legal Aid office on Donnison Street was also allegedly set alight just before 2.30pm on Thursday.
Gosford Courthouse and Director of Public Prosecutions offices were temporarily closed as a precaution until police tracked down Middleton to his Wallarah home and charged him.
Middleton had been on strict bail since April and is facing a raft of serious charges.
He was due to be sentenced yesterday, a day after the alleged arson attack, for those charges.
Now, Middleton is facing two counts of destroying or damaging property with intent to endanger life, which carries a maximum penalty of 25 years imprisonment.
The 66-year-old did not apply for bail when he faced Parramatta Local Court today.