The Giants, the defending World Series champions, acquired one of the hottest pitchers in the majors in the past month. Leake, 27, has allowed only two earned runs in 30 innings in his last four starts, all victories.
He threw eight innings of four-hit ball in a 4-0 win in St. Louis on Tuesday, completing his sensational month of July. Overall, Leake is 9-5 with a 3.56 ERA in 21 starts this season.
"We've been exploring and in touch with Cincinnati about Leake since Day 1," general manager Bobby Evans said.
The Giants trail the Dodgers by a half-game in the NL West and are in line for the second wild card behind Pittsburgh. The Reds completed the deal following a 15-5 victory over the Pirates on Thursday night.
San Francisco won World Series titles in 2010, '12 and '14. The Giants thought they needed one more starter to set them up for a down-the-stretch run at another title.
They were interested in Cole Hamels, who waived his no-trade clause to consider the Giants but ultimately went to the Texas Rangers. The Giants then went after Leake, who was on their "small list" of pitchers they thought could help them, Evans said.
Leake took to Twitter early Friday morning to share his emotions.
A bittersweet moment. I am extremely thankful to reds organization and will miss teammates, coaches, ballpark folks and most of all the fans— Mike Leake (@MikeLeake44) July 31, 2015
I will always have great memories in Cincinnati but looking forward to joining my new teammates and helping Giants try to win another title— Mike Leake (@MikeLeake44) July 31, 2015
The move is likely to affect starting pitcher Tim Hudson, who is 6-8 with a 4.80 ERA and hasn't gone seven innings in a game since June 3. Hudson won his first championship after 16 major league seasons last year and plans to retire at the end of 2015.
"I talked with Tim Hudson's agent as well as Tim that this move will likely affect his status in the rotation," Evans said. "I wanted to give Tim a heads-up this likely would affect his status immediately.
"He ultimately wants to see this club excel and have success and win. He will do whatever it takes."
The Reds got infielder Adam Duvall and right-hander Keury Mella for Leake, who can become a free agent after the season.
The deal came six days after Cincinnati dealt ace Johnny Cueto to Kansas City for three minor league pitchers. The Giants wound up getting Cincinnati's second-best starter.
Duvall, 26, grew up in Louisville and was taken in the 11th round of the June 2010 draft. He batted .279 with 25 doubles, 26 homers and 79 RBIs in 99 games for Triple-A Sacramento.
Mella, who turns 22 on Sunday, was signed as a non-drafted free agent in September 2011. He went 5-3 with a 3.31 ERA in 16 starts for Class A San Jose this season. He also was on the World team's roster for the All-Star Futures Game in Cincinnati earlier in July.
The Reds' rotation has been decimated in the last eight months. Mat Latos, who pitched for them from 2012-14, was traded to Miami in December and then to the Dodgers on Thursday. Cueto and Leake were dealt in the past week. Homer Bailey had Tommy John surgery and won't be back until sometime next season, leaving rookie starters to finish out the season.
The Associated Press contributed to this report.