Mr. Kirk’s departure was widely expected after he said last year that he was planning to leave and return to his native Texas.
As trade representative, Mr. Kirk was responsible for developing and recommending American trade policy to the president.
In a statement, the former Dallas mayor said serving Mr. Obama was his “greatest professional privilege.”
“Together, we have made great strides to bring about the president’s vision of a more robust, responsible and responsive trade policy that opens markets to products stamped ‘Made-in-America’ and enforces Americans’ trade rights around the world — and does so in a way that is more consistent with America’s core values on issues like the rights of workers and the environment.”
The departure of Mr. Kirk, who is black, comes as critics have raised questions about Mr. Obama’s commitment to diversity after the first set of second-term appointments have all been white men.
During his tenure, Mr. Kirk helped shepherd long-term trade agreements between the United States and South Korea, Colombia, and Panama — which originated during George W. Bush’s presidency.
“There’s no question Ron delivered results for the American people and for our economy,” Mr. Obama wrote in a statement. “From bringing home new trade agreements with Korea, Colombia and Panama and negotiating to open up new markets for American businesses, to cracking down on unfair trade practices around the world, he has been a tremendous advocate for the American worker.”
Mr. Kirk also led the administration’s effort to bring cases before the World Trade Organization that accused China of unfair trade practices. Among them were charges of imposing heavy tariffs on imports of U.S. automobiles, auto parts and steel.
His office also joined the European Union and Japan in accusing China of limiting its exports of rare earth minerals, which are used to manufacture hybrid car batteries, flat-screen televisions and other high tech products.
He is the latest member of Mr. Obama’s economic team to announce his departure. Treasury Secretary Timothy F. Geithner and Labor Secretary Hilda L. Solis have also announced they are leaving. The president has nominated Jacob Lew to replace Mr. Geithner at Treasury.
• This article based in part on wire service reports.