With Johnson eligible to become a free agent at the end of the season and the team in dire need of an offensive spark, the Diamondbacks decided to go in a different direction.
"He's struggled to put together a year like he had last year," Diamondbacks manager Kirk Gibson said from Washington, D.C. "It wasn't from a lack of work. To be honest with you, it was very tough to tell him he got traded today. He has high expectations of himself, he's very professional. He worked harder -- he probably worked too hard."
Johnson, 29, has been Arizona's starting second baseman the past two seasons after playing his first four years in Atlanta. He hit .284 with 26 homers and 71 RBIs his first season in the desert but has been mired in a season-long funk this year, hitting .209 with 132 strikeouts and 18 homers.
"We felt it was probably going to be difficult to sign Kelly in the offseason and within five months," Diamondbacks GM Kevin Towers said. "And at this point in time it's a sprint to the finish line and I just probably kind of ran out of patience. I thank him for everything he did and his contributions to this organization over the last couple of years."
Arizona designated infielder Cody Ransom for assignment on Wednesday to make room for the two players acquired in Tuesday's trade.
The Blue Jays, who are well back in the AL East race, gave up two of their longest-serving and most popular players for a player they hope can turn it around before the end of the season. Blue Jays GM Alex Anthopoulos said Johnson had to return to Arizona to get his passport and likely won't arrive in Toronto until Wednesday night.
"He'd be the first one to tell you, I'm sure, he's not performing the way he expected to, especially off the year he came off last year," Anthopoulos said. "It's a chance for us to get a look at him and see how he does here. A very talented player who's had a lot of success in the past. Maybe he comes here and plays well."
The Diamondbacks have tried a variety of lineup changes to break out of a recent offensive funk, but nothing has worked as their lead in the NL West dwindled to a game over the World Series champion San Francisco Giants. Arizona had scored seven runs during a six-game losing streak heading into Tuesday night's game against the Nationals.
In trading Johnson, the Diamondbacks pick up another second baseman trying to find his stroke.
Hill was an All-Star in 2009, when he hit .286 with 36 homers and 108 RBIs, but fell off the next season, hitting just .205. The 29-year-old continued to struggle at the plate for the Blue Jays this season, hitting .225 with six homers and 45 RBIs in 104 games.
"I know they've got a great squad and we're happy to be in a playoff race," Hill said. "We're looking forward to seeing what we can do there. This is a little tough -- this is all I've known."
McDonald is expected to help Willie Bloomquist at shortstop with Stephen Drew on the disabled list with a broken right ankle. The scrappy 36-year-old has played 13 seasons with three teams, hitting .250 in 65 games with Toronto this year.
"My opportunity to play for the Diamondbacks for the next five or six weeks, plus postseason, is a great opportunity, an opportunity that I wake up every morning thinking about," said McDonald, who had Gibson as his hitting coach during a 31-game stint with the Detroit Tigers in 2005.
"It's kind of what every baseball player wants. You want to try and play in the postseason and I'm extremely excited about that opportunity," he said.
The Diamondbacks also placed right-hander Jason Marquis on the 60-day disabled list with a fractured right fibula.
The Diamondbacks had hoped Marquis would provide a boost to the rotation after acquiring him for a minor leaguer from Washington. He made just three starts for Arizona, allowing 12 earned runs on 22 hits in 11 innings before breaking his shin on a ball hit by the New York Mets' Angel Pagan on Aug. 14.
Information from The Associated Press was used in this report.