Mark Harper tendered his resignation to Prime Minister David Cameron, who accepted it "with regret".
"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," he wrote in his letter.
He said he had first made checks on his female cleaner in 2007 when she was employed to help with his London flat and again in 2012.
The Conservative party MP from Forest of Dean was told this on Thursday. Harper said he immediately told UK home secretary Theresa May.
More From This Section
"I have always believed that politics is a team game, not an individual sport. Under the circumstances, I have therefore decided that the right course is for me to return to the backbenches. I am sorry for any embarrassment caused," he said.
In his response, Cameron wrote: "I am very sorry indeed to see you leave the government, but I understand your reasons for doing so.
Last year, Harper had launched a controversial government advertising campaign that targeted racially mixed areas with mobile billboards warning illegal immigrants to "go home or face arrest".
Fellow Tory MP James Brokenshire has been appointed the new immigration minister. Harper plans to continue in his role as MP.