The signing comes three days after Moyer was released by the Colorado Rockies.
The left-hander struggled to a 2-5 record with a 5.70 ERA in 10 appearances for the Rockies this season. For his career, he has racked up 269 wins -- the most among active major leaguers -- and a 4.25 ERA.
Moyer was roughed up for 13 earned runs and 16 hits in 8 2/3 innings in his final two starts.
He went 9-9 with the Phillies in 2010 but missed the 2011 season after undergoing ligament replacement surgery on his throwing elbow.
Moyer signed a contract with the Rockies following an effective spring training and became the oldest pitcher ever to win a major league game when he beat San Diego April 17.
Moyer made his major league debut in 1986 with the Chicago Cubs and made an all-star appearance while with Seattle in 2003.