The 38-year-old is 1-5 with a 3.98 ERA and 1.269 WHIP this season. He's recorded 10 saves but was replaced by Kyle Barraclough as the Marlins' closer.
Ziegler also spent six years with the Diamondbacks from 2011 to 2016 and had a 2.49 ERA in 348 appearances.
The veteran righty is in the final year of a contract that's paying him $9 million in 2018. He struggled to start the 2018 season, but he has allowed just three earned runs in 29 appearances between June and July. The Diamondbacks will hope that trend continues during the stretch run.
Earlier this year, Ziegler began making an adjustment to his delivery in hopes of seeing better performance. He's been nearly lights out ever since, lowering his ERA more than three runs since the beginning of June. The return to form led to trade rumors with the Marlins well out of the playoff picture and Ziegler nearing the end of his career.
"I have no control over it, so you know, if it happens it happens," Ziegler said, per Mike Persak of the South Florida Sun Sentinel. "If not, I’m happy here. I like the guys here. I think we're starting to do something really good here, and I like being part of the beginning of it."
Ziegler won't be under much pressure in Arizona. It will likely look to him for some seventh- and eighth-inning work and didn't give up an elite prospect.
As they make an attempt for a pennant push, though, adding Ziegler will likely be a boost for the Diamondbacks if he can keep up his recent strong performances.