The Federalist, a conservative website, published portions of what it called a resignation letter written by Mr. Gorka. It quoted him as saying that given which “forces” were on the rise in the White House, the best way for him to support the president was from outside it.

The White House, seeking to blunt Mr. Gorka’s claim that he had resigned, put out an unattributed statement saying that he no longer works in the administration, but that he did not resign.

His departure is the latest in a string of them since Mr. Kelly, a retired Marine general, took over as the White House chief of staff last month. Mr. Gorka criticized Rex W. Tillerson, the secretary of state, in a public show of disrespect that chafed Mr. Kelly’s sense of order, according to one senior administration official.

Mr. Gorka also said that in fighting terrorism, white supremacists should not be a concern. He made the remarks shortly before the racially charged violence in Charlottesville, Va., in which a man who was said to admire Adolf Hitler rammed his car into counterprotesters and left a woman dead.