Herrera was designated for assignment on Tuesday to make room on the roster for Martini. Herrera was suspended last season under Major League Baseball's domestic violence policy after his arrest at a casino in Atlantic City, New Jersey, on domestic assault charges.
The charges against Herrera were dismissed, but the 2016 All-Star remained on the suspended list.
The Phillies owe Herrera $19.5 million. The 28-year-old has a .276 career average, .333 on-base percentage and .423 slugging percentage.
Herrera hit .222 with one home run and 16 RBIs in 39 games and lost his starting job last year before his suspension.
Martini hit .226 with a .330 on-base percentage in 32 games last season for Oakland and San Diego. He's slashing .269/.372/.380 in 288 career plate appearances.
Herrera last played for the Phils on May 26. He was arrested May 27 and placed on administrative leave by MLB.
His suspension was announced July 5, and it was retroactive to June 24, covering the season's final 85 games.
Herrera lost $2,634,409 of his $5 million salary in 2019, the amount due over the final 98 days of the 186-day regular season.
The Associated Press contributed to this report.