A key aide and political adviser to Attorney General Eric Schneiderman is leaving to start his own consulting firm, his office confirmed this morning.

Schneiderman chief of staff Neal Kwatra’s departure, first reported by The New York Times, is the most high profile since the attorney general took office in 2011.

But in an email to staff, Schneiderman writes that Kwatra, 39, will remain a “part of the extended OAG family” — suggesting a broader role for Kwatra in the attorney general’s 2014 re-election campaign and other political activities.

Kwatra, who maintains close ties to the New York Hotel and Motel Trades Council, is also expected to play a role in the city’s mayoral race this year.

“For the past two years, Neal has been one of my closest and most trusted advisers,” Scheiderman wrote in the note. “With unmatched energy, passion and strategic vision, Neal has been a truly outstanding partner for me and our entire senior leadership team. Fortunately for us, he is not going far, and will remain a part of the extended OAG family. I look forward to continuing to count on his advice and counsel for many years to come.”

During Kwatra’s tenure, Schneiderman became a hero for the nation’s left, having fought for a tougher stance on a nationwide settlement with major mortgage holding banks. Later, President Obama appointed him to lead a nationwide panel of state attorneys general to investigate the fraud and abuse in the nation’s financial industry that led to the economic meltdown of 2008 and recession.

Taking over for Kwatra on an acting basis will be Melissa DeRosa, 30, the deputy chief of staff who previously was the New York director of Organizing for America, Obama’s re-election campaign.

Prior to that, DeRosa was director of communications and legislation for Cordo and Company, an Albany-based government affairs firm.