Walker had a 12-5 record with the New York Mets last season, pitching a 3.49 ERA and a 1.195 WHIP. In 2021, he earned his first and only All-Star nod.
The 30-year-old joins a Phillies team just a day after the reigning NL champions added to their potent offence by agreeing to an 11-year, $300-million deal with shortstop Trea Turner.
The Phillies recently lost pitcher Zach Eflin in free agency to the Tampa Bay Rays.
Walker began his big-league career with the Seattle Mariners in 2013 after the club selected him 43rd overall in 2010. He then joined the Arizona Diamondbacks from 2017 to 2020, before returning to Seattle in 2020 for a stint with the Mariners and also playing for the Toronto Blue Jays. He then went to New York in 2021.