Penny Lawrence said she took full responsibility and was sorry for the “harm and distress” it had caused supporters.
Oxfam has faced intense criticism over its handling of sex allegations, including the use of prostitutes by workers in Haiti in 2011.
Oxfam chiefs were called in for crisis talks with International Development Secretary Penny Mordaunt following the claims of sexual misconduct by its staff.
Ms Mordaunt said Oxfam made a “full and unqualified apology” to her and the people of Britain and Haiti for the “appalling behaviour” of some of their staff.
“They spoke of the deep sense of disgrace and shame that they and their organisation feel about what has happened, and set out the actions they will now take to put things right and prevent such horrific abuses happening in future,” Ms Mordaunt said. “It is on the basis of their actions going forward – rather than of their commitments in one meeting today - that I and others will judge them.”
A letter is being sent to every UK charity working overseas asking them to confirm that all historical or live allegations that involve potential breaches of safeguarding rules have been referred to the authorities. Foreign charities working with DfID will be asked to provide similar assurances.
Ms Mordaunt also announced the creation of a safeguarding unit within her department to combat sexual abuse in the aid sector. The unit will consider the option of creating a global register of aid workers to prevent known abusers being employed by charities.
Announcing her resignation, Ms Lawrence said: “As programme director at the time, I am ashamed that this happened on my watch and I take full responsibility.”
The resignation comes after claims yesterday that the charity was aware of concerns about the conduct of two of the men at the centre of the allegations in Haiti when they worked previously in Chad.
Ms Lawrence said: “Over the last few days we have become aware that concerns were raised about the behaviour of staff in Chad as well as Haiti that we failed to adequately act upon. It is now clear that these allegations – involving the use of prostitutes and which related to behaviour of both the country director and members of his team in Chad – were raised before he moved to Haiti.”
She added: “I am desperately sorry for the harm and distress that this has caused to Oxfam’s supporters, the wider development sector and most of all the vulnerable people who trusted us.”
The charity received £31.7 million in government funding in 2016/17 but the support has been put at risk by the scandal.
Charity Commission director of investigations Michelle Russell said the watchdog was not told the full story at the time Oxfam first investigated allegations of misconduct in 2011.
She told the BBC’s Today programme: “We’ve made very clear that had the details of what has come out over the last few days been told to us, we would have dealt with this very differently. We were categorically told there was no abuse of beneficiaries involved in the allegations. Nor were we told that there were issues or possible issues around possible crimes, including those involving minors.”
Four members of Oxfam staff were dismissed and three, including the country director, Roland van Hauwermeiren, resigned before the end of the 2011 investigation.
Downing Street refused to say whether it had full confidence in senior government officials after a former cabinet minister claimed they knew about allegations of sex abuse by aid workers.
Former aid secretary Priti Patel claimed on Sunday that “people knew in DfID” about wider problems of sex abuse in the aid sector.
Ms Patel said she had not been aware of allegations about Oxfam but had raised directly concerns about abuse in the sector.