The e-mails indicated McGurk had an intimate relationship with Chon. McGurk has since married Chon, who resigned from the Wall Street Journal last week after acknowledging that she violated in-house rules by showing McGurk unpublished stories.
In a letter to President Obama and Secretary of State Hillary Rodham Clinton, McGurk said he was removing himself from consideration for the job with a "heavy heart." He said he was doing so after consulting Chon because he believed it was in the "best interests of the country, and of our life together, to withdraw my nomination and serve in another capacity."
McGurk said that Iraq badly needs a U.S. ambassador to succeed outgoing envoy James Jeffrey, but that the furor over the e-mails was a distraction that would delay the replacement.
The controversy over the e-mails and the effect it had on Chon was a major part in his decision to withdraw, McGurk said.
"The most difficult part of this process, however, was watching my wife become a part of it," he said. "She is the most precious thing in the world to me, and the depiction of our relationship has been both surreal and devastating."
In a separate letter to friends and supporters, he wrote: "This is one of the most difficult decisions I have ever made."
When six Republican members of the Senate Foreign Relations Committee asked Obama last week to withdraw McGurk's nomination, they cited the e-mails. Some of the e-mails contain crude sexual references, and the senators said his use of an official State Department e-mail account for the exchanges raised questions. There were also questions about whether McGurk had given Chon sensitive information about the negotiations.
"The public release of information detailing unprofessional conduct demonstrates poor judgment and will affect the nominee's credibility in the country where he has been nominated to serve," the senators said.
The White House said Monday it appreciated McGurk's years of service to the country and was disappointed by his decision to withdraw.
"He has proven himself to be a skilled diplomat willing to take on some of the toughest challenges at the toughest times in a difficult region," National Security Council spokesman Tommy Vietor said.