Nunez was batting .296 with 12 home runs and 47 RBIs this season for the Twins and was leading the American League with 27 steals at the time of the trade.
The move adds some much-needed depth to San Francisco's injury-plagued infield.
Second baseman Joe Panik was activated off the disabled list prior to the Giants' game against Washington on Thursday, while third baseman Matt Duffy remains out with a strained left Achilles. Backup infielder Ehire Adrianza has also been sidelined since mid-April with a foot injury.
"Just to have a guy that has his experience, has served in that role in the past and done well and is off to a good start this season, we just feel like he can help us cover the tracks as we get 100 percent healthy and get Duffy and Panik back," said Giants general manager Bobby Evans. "It allows us to have the ability to still give them some rest, even down the stretch as we enter these last couple of months."
Nunez, a career .275 hitter, is likely to play third base until Duffy returns; he could begin a rehab assignment this weekend. Nunez started 28 games at third this season for the Twins while also splitting time at shortstop.
"The Twins are a great organization and made me feel like at home," Nunez said after Minnesota's 6-2 win against Baltimore on Thursday. "But at the end of the day, it's business, baseball. You go wherever is best for you and the team. The Giants want me and I'm going to go there and do my best."
He also looked forward to going from a team mired in last place in the AL Central to a Giants team leading the National League West.
"Any player wants to be in the playoffs," Nunez said. "I have the opportunity to go a new team that is in the playoff race. It's fun to be there."
Evans was adamant that the Giants aren't planning to replace Duffy with Nunez. The Giants second-year general manager said he spoke with Duffy and assured him his spot in the lineup is secure.
"We'll have to follow some return-to-play plan with Matt. That may be an extra day off or two off a week when he first gets back, which will give Nunez a chance to play then," Evans said. "Otherwise, it'll be as we would use any utility infield help. As we look at the rest of the season, we just want to have the protection of his experience given the time that these guys have missed and the time they may need to have off as we get down the stretch."
San Francisco sent minor league pitcher Adalberto Mejia to the Twins in exchange for Nunez.
"We think he's fairly close to the big leagues and he's got a three-pitch mix to start," said Twins interim general manager Rob Antony. "He's got a big, durable body. So we just think he profiles well. He was pretty much what we were looking for."