The 34-year-old gets a $3 million salary this season under the deal announced Friday, which includes a $4 million mutual option for 2017 with a $1 million buyout.
If he has 550 plate appearances, it would become a $4.5 million option and the buyout would rise to $1.25 million, and if he has 600 plate appearances, the option would rise to $5 million. If he has 650 plate appearances, it would become a $5.5 million option with a $1.5 million buyout.
The buyout also would escalate to $1.5 million if he is traded.
An All-Star in 2014, Ramirez dropped to a .249 average with 10 homers and 62 RBI last season. He had spent his entire eight-year big league career with the Chicago White Sox, batting .273 with 109 homers and 542 RBI.
To clear a roster sport, San Diego designated outfielder Rymer Liriano for assignment.