Amber Rudd says she had little choice but to resign as home secretary given the "justifiable outrage" over the treatment of the Windrush generation.
She said people legally living in the UK had been detained and deported and she had also inadvertently misled a Commons committee about numbers.
"This combination meant that I was right to resign," she said.
Asked if she planned a comeback, she told BBC Two's Politics Live that she was "not without ambition".
The Windrush generation had been encouraged to settle in the UK from the late 1940s to 1973 but, in many cases, were wrongly being declared illegal immigrants.
The then home secretary apologised at the time but her handling of the crisis was criticised as she sought to defend the wider impact of the government's "hostile environment" policy designed to deter illegal immigration.
During one appearance before a Commons committee, she said there were no removals targets for illegal immigrants - comments subsequently contradicted by a 2015 inspection report.
She later admitted "local" targets for voluntary removals had been set but told the Commons she had not been aware of them. This was subsequently contradicted by a June 2017 memo from an official, copied to Ms Rudd, that referred to targets.
A letter from January 2017 also emerged in which Ms Rudd told Prime Minister Theresa May about plans to restructure her department and increase removals "over the next few years".
Appearing on the first edition of Politics Live, Ms Rudd was asked by its presenter Jo Coburn whether she had sacrificed herself to protect Mrs May, her predecessor as home secretary, who initiated the "hostile environment" policy.
"No, I don't think so," she replied. "I think it was a situation where the home secretary at the time, when this came to light, was probably going to have to resign."
Reflecting on the events leading up to her departure, she added: "I resigned over the fact that a number of people had been detained or deported over a period of 10 to 15 to 20 years who should not have been.
"There was a justifiable outrage in the country. Within that, I got an element of an answer to a select committee wrong. The combination meant that I felt it was right to resign."
Her successor as home secretary, Sajid Javid, said last month that a review of 11,800 Windrush cases showed 164 people may have been wrongfully deported or detained.
He issued a formal apology to the 18 of those "most likely to have suffered detriment".