Immigration Minister Mark Harper offered the Prime Minister his resignation after belatedly discovering that the woman, who he first employed in April 2007, did not have permission to work in the UK.
"In retrospect, I should have checked more thoroughly," he wrote in a letter to David Cameron, admitting that he had twice considered rechecking her paperwork, but chose not to. He apologised "for any embarrassment caused".
The Forest of Dean MP launched a Home Office campaign last summer in which advertising vans toured areas of London with the message "In the UK illegally? Go home or face arrest" next to a picture of handcuffs.
Condemned by LibDem business secretary Vince Cable as "stupid and offensive", the £10,000 pilot was abandoned after having almost no effect on illegal immigration.
Even Home Secretary Theresa May admitted the ads had been "too much of a blunt instrument".
Harper had also been in charge of the Immigration Bill, which will double the civil penalty for employers who fail to undertake the correct right-to-work checks to £20,000.
Announcing the Bill last July, he declared: "This Government is committed to taking action to effectively tackle illegal working. Illegal working encourages illegal immigration, it undercuts legitimate businesses by illegal cost-cutting activity, and is often associated with exploitative behaviour like tax evasion and harmful working conditions."
Downing Street last night insisted there was "no suggestion" Harper has "knowingly employed an illegal immigrant".
Accepting the resignation "with regret", David Cameron said he was "very sorry" to see Harper go. He said he hoped the 43-year-old would soon return to the front benches.
In a mini-reshuffle, Tory MP James Brokenshire was appointed as the new immigration minister.
In his letter to Cameron, Harper said he had first employed the cleaner at his flat in April 2007, when he checked her passport and saw a letter dated January 26, 2006 from the Home Office - 15 months earlier - which said she had indefinite leave to remain in the UK, including the right to work and run a business.
Harper said that when Cameron first appointed him a Cabinet Office minister in 2010, he had decided "no further check was necessary".
When he became immigration minister in September 2012, Harper said he had again considered whether to recheck his cleaner's immigration status, but decided the 2007 check had been sufficient.
It was only when he took the Immigration Bill through Parliament last autumn that he thought it "prudent" to check the cleaner's documents. Unable to find them, he asked the woman for copies in late January, and received them last week, when he asked his private office to check they were in order.
On Thursday, he was told she did not have indefinite leave to remain in the UK, and he reported the matter to the Home Secretary. "This is now an enforcement matter for immigration enforcement," he wrote to Cameron.
"Although I complied with the law at all times, I consider that as immigration minister, who is taking legislation through Parliament which will toughen up our immigration laws, I should hold myself to a higher standard than expected of others.
"Under the circumstances, I have therefore decided that the right course is for me to return to the back benches."
In reply, Cameron said Harper had taken "an honourable decision", adding: "I understand your view that, although you carried out checks on your cleaner, you feel that you should hold yourself to an especially high standard as immigration minister."
Shadow immigration minister David Hanson said Harper was "a decent man" and wished him well.
However, he said the Government needed to think again about relying on employers' and landlords' checks to address illegal immigration.