This marks the third All-Star selection for Peavy, who was named to the National League squad in 2005 and 2007. Peavy, 31, finished second to Yu Darvish of Texas for the Final Vote ballot that concluded Thursday.
Peavy joins teammates Paul Konerko, Adam Dunn and Chris Sale on the AL squad that will play the NL on Tuesday night at Kauffman Stadium.
Peavy has a 7-5 record and 2.85 ERA in 17 starts and a team-high 120 innings. He beat Toronto 4-2 in his final start of the first half on Friday.
He replaces the Angels' C.J. Wilson.
Peavy left U.S. Cellular Field to fly to Colorado to pay his respects to friend and former San Diego bullpen coach Darrel Akerfelds, who passed away June 24 after a bout with pancreatic cancer. He's expected to fly to Kansas City on Monday for All-Star Game festivities.