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.
San Francisco is looking for help in the outfield while Hunter Pence recovers from a left oblique strain. It got Marlon Byrd in a trade with Cincinnati on Aug. 20.
Because the deal was made before Sept. 1, De Aza will be eligible for the postseason if the Giants get that far.