The trade was announced Thursday morning, about three hours before Walker had been scheduled to start the first game of a doubleheader against the San Diego Padres.
The first game of the doubleheader was a makeup of Wednesday night's game, which was postponed after Mariners players voted not to play to protest the shooting of a Black man by police in Kenosha, Wisconsin.
Walker was 2-2 with a 4.00 ERA in five starts this season, with 25 strikeouts and eight walks. He is 33-33 with a 3.95 ERA in parts of eight big league seasons.
He was originally drafted by the Mariners in the first round of the 2010 amateur draft. After pitching for the Mariners from 2013 to 2016, he was traded to Arizona in a multi-player deal on Nov. 23, 2016.
His career was interrupted by Tommy John surgery in 2018.
He rejoined the Mariners as a free agent in February.