Pittsburgh also got minor league pitcher Kyle Kaminska for minor league outfielder Gorkys Hernandez and the extra draft pick for 2013 that the Pirates won in the competitive balance lottery for financially weaker teams.
General manager Neal Huntington said the price to acquire a high-profile player for the rest of the season was too steep.
"We feel like overall we've improved our rotation, we've improved our lineup, we've improved our bench, and we'll work to put our bullpen in the same spot it was," Huntington said. "The acquisition cost on every quote-unquote sure thing -- which I will remind you, there is no sure thing -- was prohibitive for us."
"Short term rentals more often than not don't work out for the team that gives up the prospects," he added.
Pittsburgh, chasing Cincinnati for the NL Central title and doing well in the wild-card race, also obtained right-handed reliever Chad Qualls from the New York Yankees for infielder Casey McGehee on Tuesday, just before the 4 p.m. deadline for trades without waivers.
The 28-year-old Sanchez was having a disappointing year. He was batting only .202 with three home runs and 17 RBIs, and had been demoted to Triple-A in May for nearly a month.
"We liked him the past two years," Pirates manager Clint Hurdle said. "We've inquired about him the past two winters and couldn't get close to him. You don't get players when they're going well."
Sanchez hit 19 home runs in each of the previous two seasons and was an NL All-Star last year.
"Our scouts have seen the bat speed and the impact that we saw a year ago," Huntington said on a conference call. "We've seen him start to use the middle of the field with authority. ... He is showing that he's performing well, and we see the elements behind it to justify the performance."
Huntington said Snider would "get the primary work load" in right field, and that Qualls was added to fill the hole in the bullpen created when Brad Lincoln was sent to the Blue Jays in the deal.
Snider, hitting second in the lineup Tuesday against the Cubs, said he was looking forward to a pennant race.
"I'm excited to be a part of a winning ballclub," Snider said. "It's been exciting to watch this ballclub, just being a fan of baseball and seeing the strides they've taken over the last five years. They've really put together a great clubhouse and a great team and I'm looking forward to being a part of it."
Qualls has a 4.89 ERA this season. Huntington said he didn't pay much attention to the ERA of relievers, noting instead that scouts had seen "quality sink" from Qualls.
"Reliever ERA is one of the worst statistics to evaluate any player on," Huntington said. "Chad feels like he's found a mechanical fix that will enable him to keep the ball down in the strike zone on a regular basis .... We feel like he's going to be helped by our league and our ballpark."
The Marlins recently traded away star infielder Hanley Ramirez and pitcher Anibal Sanchez. Miami got three-time All-Star Carlos Lee from Houston in early July, but the first baseman did little damage for his new team.
Kaminska, a 23-year-old righty, was a combined 6-4 with one save and a 5.20 ERA in Triple-A and Double-A.
Hernandez had two hits and batted .083 for Pittsburgh this season. The 24-year-old hit .257 with two homers and 25 RBIs in Triple-A.