A top aide to President Trump’s housing secretary nominee, Ben Carson, was fired and led out of the department’s headquarters by security on Wednesday after writings critical of Mr. Trump surfaced in his vetting, according to two people briefed on the matter.

Shermichael Singleton, who was one of the few black conservatives in the Trump administration, had been working at the Department of Housing and Urban Development since Jan. 23 as a senior adviser. He was preparing a cross-country tour for Mr. Carson, who is expected to be confirmed by the Senate this month.

But according to the two people briefed, Mr. Singleton’s background check had not been completed. As it was being finished this week, Mr. Trump’s advisers turned up public writings by Mr. Singleton that appeared during the later stages of the campaign in which he was deeply critical of the candidate.

.

Ben Carson, right, greeted Shermichael Singleton, a top aide, before the start of his confirmation hearing to be secretary of the Department of Housing and Urban Development last month.Credit Al Drago/The New York Times