Castillo must pass a physical for the deal to be finalized, according to AP.
The three-time All-Star hit .296 for the Mets with 10 steals and 20 RBIs, who acquired him from Minnesota on July 30. He batted .304 with 18 RBIs for the Minnesota Twins.
Castillo also won three Gold Gloves and provided steady defense up the middle with shortstop Jose Reyes despite playing on a sore knee that limited his speed. The 32-year-old hit .316 in September, one of the few Mets who came through as the team collapsed and blew a seven-game lead.
Castillo's preliminary agreement came on the same day that two-time Cy Young Award winner Tom Glavine decided to leave the Mets and return to the Atlanta Braves, his original team. Glavine was given an $8 million, one-year contract after turning down a $13 million option to stay with New York and receiving a $3 million buyout.
On a busy weekend, the Mets also broke off talks with free-agent catcher Yorvit Torrealba. The sides had reached a preliminary agreement last week on a $14.4 million, three-year contract that was subject to a physical.