US Labor Secretary Alexander Acosta stepped down following criticism of his handling of a 2008 plea deal with wealthy financier Jeffrey Epstein, who is accused of sexually abusing dozens of underage girls.
President Donald Trump announced the resignation on Friday with Acosta by his side at the White House as he left on a trip to the US state of Wisconsin.
"I hate to see this happen," Trump said, adding he didn't ask Acosta to leave the Cabinet.
Acosta said his resignation would be effective in seven days. He added he didn't think it was right for his handling of Epstein's case to distract from his work as secretary.
Trump named Deputy Labor Secretary Patrick Pizzella as the acting secretary of labour.
Controversial plea deal
Acosta has served in Trump's cabinet since April 2017.
From 2005 through 2009 he was the US attorney for the Southern District of Florida. It was there that he handled Epstein's first case involving sex with underage girls, which resulted in a punishment that critics say was far too lenient.
Epstein, 66, reached the deal to secretly end a federal sex abuse investigation involving at least 40 teenage girls that could have landed him behind bars for life. He instead pleaded guilty to state charges, spent 13 months in a work-release programme, paid settlements to victims and registered sex offender.
Reporting by the Miami Herald earlier this year and similar charges recently filed against Epstein by federal prosecutors in New York had put Acosta's role in the 2008 deal under renewed scrutiny.
Top Democratic politicians and presidential candidates had demanded that Acosta resign over his handling of the agreement, which a federal judge has said violated federal law because Acosta did not notify Epstein's victims of the arrangement. The Justice Department has been investigating.
Trump had initially defended Acosta but said he'd look "very closely" his handling of the 2008 agreement.
Acosta had attempted to clear his name and held a news conference - encouraged by Trump - earlier this week to defend his actions. In a 50-plus-minute lawyer-type rebuttal, Acosta argued his office had secured the best deal it could at the time and was working in the victims' best interests.
"We did what we did because we wanted to see Epstein go to jail," he said, refusing to apologise for his actions. "We believe that we proceeded appropriately."
Pressed on whether he had any regrets, Acosta repeatedly suggested that circumstances had changed since then.
"We now have 12 years of knowledge and hindsight and we live in a very different world," he said. "Today's world treats victims very, very differently," he said.