Story highlights "Trump portrays our inner cities is as if they are the ailments of American society," he wrote

Singleton was an adviser to Ben Carson

(CNN) A political appointee at the Department of Housing and Urban Development was fired for an op-ed he wrote before the election that criticized then-candidate Donald Trump, a source with knowledge of the situation told CNN.

In an October op-ed for The Hill , Republican consultant Shermichael Singleton said Trump was taking the Republican Party to a "new moral low."

"We allowed that hostile takeover to happen on our watch," he wrote. "This individual recognized a moment of great disparity in the Republican base and, like cancer, attacked and spread, consuming everything in his path."

Singleton's piece criticized Trump's rhetoric about African Americans during the campaign. After the election, the 26-year-old worked with Ben Carson during his confirmation process to become HUD secretary. Singleton, who is African American, then joined the department as a senior adviser.

But on Wednesday, he was brought into the chief of staff's office and fired, the source familiar with the situation told CNN. Singleton was told he was being dismissed because of the op-ed and was escorted from the building, according to the source, who also said Carson was surprised by the move and only learned of it after the fact.

Read More