Mark Harper, the immigration minister behind the controversial campaign that put "go home" adverts on vans to urge illegal immigrants to leave Britain, has resigned after learning that his private cleaner for seven years did not have permission to work in the UK.

Harper, who was steering an immigration bill through the Commons that warns employers of their duty to check the status of employees, notified David Cameron on Friday, when his resignation was accepted "with regret".

Downing Street, however, said there was no evidence that Harper "knowingly employed an illegal immigrant".

Harper's resignation was accepted just 24 hours after he discovered his cleaner was in the UK illegally. It prompted a mini-reshuffle, with Home Office minister James Brokenshire promoted to Harper's position and Karen Bradley, Conservative MP for Staffordshire Moorlands, filling the former's position.

Harper's time in the Home Office will be best remembered for last summer's campaign, which saw mobile "go home" adverts deployed in parts of London. It was a drive that proved futile as well as divisive; within months, Theresa May had conceded the ads were "too much of a blunt instrument" amid reports that only one immigrant had gone home as a result.

Other heavily criticised initiatives were the introduction of spot checks in London tube stations.

Correspondence between Harper and Cameron, published in a Spectator blog, reveals that on 7 February Harper wrote to the prime minister explaining how he had tried on several occasions to make sure his cleaner had leave to remain in the country. When appointed in September 2012, Harper repeated the background checks into his cleaner, whom he has hired since April 2007.

"In retrospect, I should have checked more thoroughly," he conceded to Cameron. After being unable to locate some of the cleaner's documentation, he explained how – aware of employers' responsibilities under the immigration bill – he had again asked her for fresh copies of her passport and other documentation. There was praise from across the political spectrum for Harper's achievements and the swiftness of his resignation. Home secretary Theresa May said Harper should be "proud of the role he has played in sharply reducing immigration to Britain".

Keith Vaz MP, chairman of the home affairs committee, said: "The immigration portfolio is one of the toughest in government but he carried out his role with effectiveness and good humour."

Cameron wrote: "I have always enormously appreciated your energy and your loyalty. It is typical of you that you should be so mindful of the wider interests of the government and the party in reaching the decision that you have, and I am very grateful for that.

"You will be greatly missed, and I hope very much that you will be able to return to service on the frontbench before too long."

Shami Chakrabarti, director of Liberty, said it was a "bitter irony" that Harper should "fall foul of a mad and toxic immigration debate" authored by his own government. "The vile immigration bill would turn landlords and vicars into border police, checking people's status before offering them shelter or marriage services," she said. "It's the nasty immigration politics and not the politician that should go."

Rachel Williams: Isabella Acevedo was snatched by immigration officials from her own daughter's wedding and now faces deportation, while the minister who once employed her is back in government. She tells her story here