Papelbon is Philadelphia's career saves leader with 123 and is 17-for-17 in save chances this season. Papelbon also is Boston's saves leader with 219.
Papelbon, 34, had said he wouldn't accept a trade unless he would remain a closer, and he agreed to waive his no-trade clause after getting the assurances he needed from Washington.
Drew Storen, 29-for-31 in save chances this season, shifts to primarily a setup role.
"Papelbon is our ninth-inning pitcher," Nationals general manager Mike Rizzo said. "Drew will pitch the ninth inning at times when Papelbon is unavailable and be our setup guy in the eighth inning as we are constructed today. Paps hasn't pitched too many three-days-in-a-row stints. We're going to be careful with him, and we feel that we've got two terrific, elite ninth-inning guys who can close out games in pressure situations."
As part of the trade, Papelbon's $13 million option for 2016 becomes a guaranteed $11 million salary. Some of that money will be deferred, Rizzo said; a major league source told ESPN it would be $3 million.
The source also told ESPN that Washington will pay Papelbon the major league minimum -- prorated from $507,500 -- for the rest of this season.
Rizzo said the Nationals weren't worried about bringing Papelbon into their clubhouse mix.
"This guy wants to win," Rizzo said. "First and foremost, he wants to win. He's a winner. He's won his whole career. He excels in pressure situations, and that's his personality. Does it grate on the opposition at times? Yes, it does, but he comes with high credentials, high praise from his teammates and guys who have been around him."
Pivetta, who is 6-foot-5, 220 pounds, was 7-6 with a 3.02 ERA in 18 games (17 starts) between Class A Potomac and Double-A Harrisburg this season.
A 22-year-old Canadian, Pivetta was a fourth-round draft selection in 2013. He was ranked by Baseball America as the 10th-best prospect in the Nationals' organization.
The rebuilding Phillies also are trying hard to trade ace Cole Hamels, who threw his first career no-hitter Saturday at Wrigley Field.
A three-time All-Star and the 2008 World Series MVP, Hamels has three years remaining on a $144 million, six-year contract, a deal that includes a club option for 2019. Like Papelbon, Hamels has made it clear he'd like to go to a contender. He has a limited no-trade clause, so he might have to approve a deal.
Rizzo said he met with Storen while the deal was being put together and that he took the news well.
"He took it like a pro," Rizzo said.
"We felt this was the best deal we could have made for the opportunity to get ourselves a back-end-of-the-bullpen type of guy," Rizzo said. "We had a lot of discussions with a lot of teams about a lot of relief pitchers. ... We think we've got one of the elite closers in the game of baseball."
The Nationals expect Papelbon in Miami on Wednesday. Papelbon has appeared in the 2005, 2007, 2008 and 2009 postseasons, going 2-1 with a 1.00 ERA and converting seven saves in nine opportunities.
Information from The Associated Press and ESPN's Jim Bowden and Jerry Crasnick was used in this report.