WASHINGTON — Two of Representative Alexandria Ocasio-Cortez’s top aides who were instrumental in forging her unexpected path to victory last year are leaving Capitol Hill, less than a month after one of them ignited a firestorm by challenging Speaker Nancy Pelosi and comparing moderate House Democrats to segregationists.

House Democrats had been privately calling for the ouster of Saikat Chakrabarti, Ms. Ocasio-Cortez’s embattled chief of staff. He and Corbin Trent, her communications director, had gone to Capitol Hill determined to wage their confrontational brand of progressive politics forged as leaders of Justice Democrats, a group dedicated to unseating entrenched Democratic lawmakers through primary campaigns. Justice Democrats helped Ms. Ocasio-Cortez sweep to power with the defeat of a veteran House Democrat, Joseph Crowley.

But less than a year later, after a bruising skirmish this summer with Democratic leadership, both are calling it quits, they told The Intercept on Friday. Their departures will be seen as Ms. Ocasio-Cortez’s most tangible peace offering since her private meeting last week with Ms. Pelosi.

Mr. Chakrabarti “has decided to leave the office of Representative Ocasio-Cortez to work with New Consensus to further develop plans for a Green New Deal,” Mr. Trent told The Intercept, referring to the congresswoman’s ambitious climate change program. “We are extraordinarily grateful for his service to advance a bold agenda and improve the lives of the people in” New York’s 14th District.