Minor league infielder Zachary Walters went to Washington in the deal.
Marquis, 32, has compiled an 8-5 mark with a 3.95 ERA over 20 starts this season. He has played for the Atlanta Braves, St. Louis Cardinals, Chicago Cubs, Colorado Rockies and Nationals over his 12-year career.
Marquis is 104-97 with a 4.52 ERA for his career.
Walters, 21, was batting .302 with nine homers and 56 RBI in 97 games for Class A South Bend this season.
The Diamondbacks entered Saturday's action four games behind the first-place San Francisco Giants in the National League West.