"That time has come", Feeley said, according to an excerpt of the letter read to Reuters.
"My instructors made clear that if I believed I could not do that, I would be honor bound to resign", Feeley continued.
The State Department confirmed that Feeley, who served for 35 years in the U.S.
The State Department confirmed the departure, saying Feeley has chose to "retire for personal reasons, as of 9 March this year".
John Feeley, 56, who worked at the State Department for almost 30 years, announced his resignation in a letter to the State Department.
Feeleys departure comes a day after Trump reportedly used offensive language during a meeting in the Oval Office with lawmakers, when they proposed restoring protections for immigrants from Haiti, El Salvador and African countries as part of a bipartisan immigration deal.
Trump denies using the term. He tweeted: "Never said anything derogatory about Haitians other than Haiti is, obviously, a very poor and troubled country". Made up by Dems. But Under-secretary of State Steve Goldstein seemed to confirm as much in comments to reporters on Friday.
He has served since 2016, appointed by former president Barack Obama, in a foreign service appointment which typically lasts around three years.
Elizabeth Shackelford, who worked in Nairobi for the USA mission to Somalia, resigned in December.
The U.S. ambassador to Panama resigned Friday, saying that he could no longer "faithfully" serve the President.