New York will give up pitcher Jordan Humphreys, who was designated for assignment last week. The right-hander was considered the team's No. 14 overall prospect, according to MLB.com.
Hamilton hadn't appeared in a game this season with the Giants and was at the team's alternate site.
The 29-year-old had initially joined San Francisco on a minor league contract this offseason after hitting just .218 in 119 games last year between the Kansas City Royals and Atlanta Braves. He batted .245 across six years with the Cincinnati Reds, totaling 21 home runs while his OPS never topped .664 in a season.
Despite his lack of production at the plate, Hamilton provides value with his speed and defense.
The outfielder has had over 50 steals in a season four different times, swiping 22 bags last year despite inconsistent playing time. Per Fangraphs, he also has 73 career defensive runs saved in center field, including eight last season.
This could help a Mets lineup that has few natural center fielders, especially with Jake Marisnick on the injured list, and also lacks speed (no one has more than one stolen base this season).
Giants manager Gabe Kapler also previously noted the value Hamilton could have in extra innings with a player starting on second base.
"He's a perfect piece for that moment," Kapler said on the Giants Insider Podcast, per Alex Pavlovic of NBC Sports. "One of the things [Giants general manager Scott Harris] brought up is how nice would it be to have Billy Hamilton run out there at second base and try to steal third base with a stolen base rate in the past of like 85 percent. He's been really successful at it and Scott brought that point up to me."
San Francisco receives a player with a lot of upside but who has been limited by injuries with only two minor league innings since 2017. Tommy John surgery took away Humphrey's entire 2018 campaign while he was slow to return in 2019.
The 24-year-old showed what he could do at the Arizona Fall League this past offseason, posting a 0.77 ERA in 11.2 innings.
If he can remain healthy, the Giants could end up getting a steal in the prospect.