González became the first pitcher since 1918 to have three consecutive appearances in which he finished a start with at least six shutout innings and no more than two hits allowed. González set a Nationals record when he pitched 25 consecutive scoreless innings, that ended on April 29, 2012. When the 2012 MLB All-Star Game roster was announced on July 1, González found himself on it for the second time in his career. Later that same day, he earned his 11th win on the season after the Nationals topped the Atlanta Braves, 8–4. González would earn one more win in his last start before the All-Star break, pushing his record to 12–3 and lowering his ERA to 2.92, and in doing so, was tied for the most wins on the first half of the season. His win total tied a Nationals record set in 2005 by Liván Hernández.
On August 8, 2012, González hit his first career home run off Houston Astros pitcher Armando Galarraga and pitched his second career complete game. On August 31, González pitched his first career shutout in a 10–0 rout of the St. Louis Cardinals.
When González and the Nationals beat the Milwaukee Brewers on September 22, it moved his record to 20–8 and he became the first pitcher in MLB to reach the 20-win mark on the season. He finished the regular season with a major league best 21 wins, to go along with a 2.89 ERA and 207 strikeouts, winning the 2012 Warren Spahn Award as the best left-handed pitcher in the majors. González finished third in NL Cy Young voting in 2012.
In 2012, González created the GIO (Giving Individuals Opportunities) foundation, a charity to assist medical patients in need of financial support. He is also a comic book hobbyist.