The head of the United Nations agency created to eradicate the AIDS crisis resigned “with immediate effect” on Wednesday, five months after his leadership was impugned in a damning report about workplace sexual harassment and bullying.

Michel Sidibé, the executive director of the agency, U.N.AIDS, has accepted a position as the minister of health and social affairs in his native Mali, the agency said in a statement that extolled what it described as Mr. Sidibé’s “remarkable contribution to the AIDS response” since his appointment a decade ago.

A panel of independent experts who reviewed the Geneva-based agency last year found Mr. Sidibé responsible for fostering a cult of personality and patriarchal management, saying he had “enabled a culture of harassment, including sexual harassment, bullying and abuse of power.” Their review said the atmosphere at the agency was “toxic.”

Even while acknowledging his achievements in combating AIDS, the experts said they had no confidence in his leadership. Critics of Mr. Sidibé said the review was so damaging that he had little choice but to resign. Instead, he promised changes at the agency and said he would leave at the end of June, six months ahead of his term’s expiration.