"Mr Harper notified Prime Minister David Cameron, who accepted his resignation "with regret", Number 10 said.
It added there was "no suggestion" the Conservative MP for the Forest of Dean had "knowingly employed an illegal immigrant".
Fellow Tory James Brokenshire has been appointed the new immigration minister.
In his letter to the PM, Mr Harper said he would continue in his role as MP.
He also explained in the letter that he had first made checks on his cleaner in 2007 and again in 2012.
A year later, he said, he talked a lot about employers and landlords carrying out "reasonable checks" on workers.
Given this focus, he said, he thought it "prudent to check that all my documents were in order for my cleaner".
"I undertook an extensive search to locate the copies of documents I had taken but unfortunately I was unable to locate them," he wrote."
BBC News - Immigration minister Mark Harper quits over cleaner's visa
WTF is going on in this country??
It added there was "no suggestion" the Conservative MP for the Forest of Dean had "knowingly employed an illegal immigrant".
Fellow Tory James Brokenshire has been appointed the new immigration minister.
In his letter to the PM, Mr Harper said he would continue in his role as MP.
He also explained in the letter that he had first made checks on his cleaner in 2007 and again in 2012.
A year later, he said, he talked a lot about employers and landlords carrying out "reasonable checks" on workers.
Given this focus, he said, he thought it "prudent to check that all my documents were in order for my cleaner".
"I undertook an extensive search to locate the copies of documents I had taken but unfortunately I was unable to locate them," he wrote."
BBC News - Immigration minister Mark Harper quits over cleaner's visa
WTF is going on in this country??
Comment