De Aza is batting .261 with seven homers and 32 RBIs in 90 games this season, splitting time with Baltimore and Boston. The Red Sox acquired the 31-year-old De Aza in a June 3 trade with the Orioles.
The Giants announced the deal Monday night. The Red Sox received minor league left-hander Luis Ysla in the trade.
Because the deal was made before Sept. 1, De Aza will be eligible for the postseason if the Giants get that far.