The Pentagon's top spokeswoman — who was being investigated for misconduct by the Defense Department — abruptly announced her resignation Monday on Twitter.

The New Year's Eve tweet from Dana W. White came hours after outgoing Defense Secretary James Mattis sent his farewell message to department employees.

"I appreciate the opportunity afforded to me by this administration to serve alongside Secretary Mattis, our Service members and all the civilians who support them. It has been my honor and privilege," White tweeted on Monday.

I appreciate the opportunity afforded to me by this administration to serve

alongside Secretary Mattis, our Service members and all the civilians who

support them. It has been my honor and privilege. Stay safe and God bless. — Dana W. White - DOD (@ChiefPentSpox) December 31, 2018

The resignation is apparently immediate — Charles Summers Jr. is set to become acting assistant to the defense secretary for public affairs on Tuesday, a military official told NBC News.

White, author of "Leader Designed: Become the Leader You Were Made to Be," was being investigated by the DoD's inspector general for allegedly forcing her subordinates to run personal errands and removing staffers who complained about her.

Former and current staffers told NBC News in August that White had been accused of having staffers buy her pantyhose and other personal items at the CVS in the Pentagon, pick her up at home and drive her to the Pentagon during storms, fetch her dry cleaning and meals throughout the day, book her grooming appointments and help her plan personal trips. She even had them make phone calls to a foster care facility about adopting a child, the sources said.

Pentagon ethics guidelines say that "a DoD official may not direct or request subordinates to use official time to perform any activities other than official activities."

Investigators were also looking into allegations that White removed at least four DoD employees who'd complained about her conduct and had them reassigned as acts of reprisal. A Pentagon spokesperson confirmed the investigation in August.

Summers is a captain in the Navy Reserves who has done tours in Iraq. He's also run for congress several times in his native Maine.

White, a former publicist for Fox News who speaks Mandarin Chinese and French, was a foreign policy adviser for the John McCain/Sarah Palin GOP presidential campaign in 2008, her DoD biography says. She's also a former professional staff member on the senate's Armed Services Committee, and former director of policy and strategic communications for the Renault-Nissan Alliance.