Following the resignation of Jon Huntsman, Jr., Obama nominated Locke to serve as United States Ambassador to China.
The Senate confirmed Locke unanimously on July 27, 2011; Locke resigned as Secretary of Commerce on August 1.

A photo of Locke carrying his own knapsack and ordering his own coffee at the Seattle-Tacoma International Airport went viral in China on the Sina Weibo social network, with many commentators approving of his humble, low-key style.
At his first news conference after arrival in Beijing, Locke pledged to promote bilateral cooperation and understanding between the two countries.

Early in Locke's ambassadorship, Chinese dissident Chen Guangcheng escaped from house arrest and sought refuge in the U.S. Embassy in Beijing in April 2012.
On May 2, China's Ministry of Foreign Affairs demanded an apology from the U.S. for its role in the incident.
In an editorial on May 4, Beijing Daily questioned Locke's motives by taking Chen in, describing Chen as "a tool and a pawn for American politicians to blacken China."

In late November 2013, Locke announced that he would step down as ambassador to spend more time with his family in Seattle.
In an analysis of his ambassadorship, Sun Zhe, a professor at Tsinghua University in Beijing, said, "It is not an easy job to be the American ambassador to China.
Gary Locke is not a shining star, but a simple and unadorned ambassador."
Shen Dingli, dean of the international studies department at Fudan University in Shanghai, largely concurred, commenting that Locke "showed us how a U.S. minister-level official behaves by taking economy-class flights" but "caused a twist" when he allowed Chen refuge in the U.S. embassy.
Max Baucus, a former United States Senator from Montana, was Obama's nominee to replace Locke and was confirmed by the Senate 96–0; Vice President Joe Biden administered the oath of office on February 21, 2014.
Following the resignation of Jon Huntsman, Jr., Obama nominated Locke to serve as United States Ambassador to China. The Senate confirmed Locke unanimously on July 27, 2011; Locke resigned as Secretary of Commerce on August 1.
A photo of Locke carrying his own knapsack and ordering his own coffee at the Seattle-Tacoma International Airport went viral in China on the Sina Weibo social network, with many commentators approving of his humble, low-key style. At his first news conference after arrival in Beijing, Locke pledged to promote bilateral cooperation and understanding between the two countries.
Early in Locke's ambassadorship, Chinese dissident Chen Guangcheng escaped from house arrest and sought refuge in the U.S. Embassy in Beijing in April 2012. On May 2, China's Ministry of Foreign Affairs demanded an apology from the U.S. for its role in the incident. In an editorial on May 4, Beijing Daily questioned Locke's motives by taking Chen in, describing Chen as "a tool and a pawn for American politicians to blacken China."
In late November 2013, Locke announced that he would step down as ambassador to spend more time with his family in Seattle. In an analysis of his ambassadorship, Sun Zhe, a professor at Tsinghua University in Beijing, said, "It is not an easy job to be the American ambassador to China. Gary Locke is not a shining star, but a simple and unadorned ambassador." Shen Dingli, dean of the international studies department at Fudan University in Shanghai, largely concurred, commenting that Locke "showed us how a U.S. minister-level official behaves by taking economy-class flights" but "caused a twist" when he allowed Chen refuge in the U.S. embassy. Max Baucus, a former United States Senator from Montana, was Obama's nominee to replace Locke and was confirmed by the Senate 96–0; Vice President Joe Biden administered the oath of office on February 21, 2014.
Gary Locke