The campaign, which involved poster-clad vans driving through six London boroughs between July 22 and July 28, drew 224 complaints to the Advertising Standards Authority (ASA), including some from groups representing migrants in the UK, legal academics and the Labour peer Lord Lipsey.
The poster featured a close-up image of someone holding a pair of handcuffs and wearing a uniform with a "Home Office" badge and a box stating: "In the UK illegally? Go home or face arrest."
Green text in the style of an official stamp stated "106 arrests last week in your area".
Small print at the bottom of the poster said the arrest figures were from the period June 30 to July 6 and covered Barking and Dagenham, Redbridge, Barnet, Brent, Ealing and Hounslow.
Most of the complainants said the poster, and in particular the phrase "go home", was offensive and distressing because it was reminiscent of slogans used by racist groups to attack immigrants in the past, and irresponsible and harmful because it could incite or exacerbate racial hatred and tensions in multicultural communities.
The Home Office said the vans were sent to Barking and Dagenham, Redbridge, Barnet, Brent, Ealing and Hounslow - all boroughs which had either significantly above average, or very low, uptake of the voluntary departure route for illegal immigrants.
The message, that was "in no way racist", needed to be short and easily understood because it was displayed on moving vehicles.
It said the Metropolitan Police had confirmed that there were no increases in "community tension indicators" in the pilot boroughs or elsewhere in London during the period the posters were displayed, and a survey conducted by YouGov on August 13 found that 66% of those polled did not consider the posters racist.
The Home Office said the data used to support the "106 arrests" figure was the most reliable and recent information on arrests made by the West, North and East London Immigration Compliance and Enforcement teams and from seven police custody suites in the six pilot boroughs during the week beginning June 30.
The ASA said it acknowledged that the phrase "go home" was reminiscent of slogans used in the past to attack immigrants to the UK, but was generally used in that context as a standalone phrase or accompanied by racially derogatory language.
It said: "We considered that, in context, the claim would be interpreted as a message regarding the immigration status of those in the country illegally, which was not related to their race or ethnicity.
"We recognised that the poster, and the phrase "go home" in particular, were likely to be distasteful to some in the context of an ad addressed to illegal immigrants, irrespective of the overall message conveyed, and we recognised that wording less likely to produce that response, such as "return home" could have been used.
"However, we concluded that the poster was unlikely to cause serious or widespread offence or distress."
It also concluded that the poster was unlikely to incite or exacerbate racial hatred and tensions in multicultural communities, and that it was "not irresponsible and did not contain anything which was likely to condone or encourage violence or anti-social behaviour".
But it said those who saw the poster would understand the claim "106 arrests last week in your area" to mean that during the previous week 106 people in the area in which they saw the poster had been arrested under suspicion of being in the UK illegally.
It said: "Because the data on which the claim was based related to a significant part of London north of the Thames rather than to the specific areas in which the poster was displayed, and because the data did not relate to the week prior to the campaign, we concluded the claim was misleading and had not been substantiated.
"We considered the size of the font used for the qualification, its prominence relative to other information in the poster and the limited time in which those who saw the poster would have to read the qualification meant it had not been presented sufficiently clearly. We therefore concluded the poster was misleading."
The ASA ruled that the ad must not appear again in its current form, and said: "We told the Home Office to ensure that in future they held adequate substantiation for their advertising claims and that qualifications were presented clearly."
ASA chief executive Guy Parker said: "Although distasteful to some, we've ruled that the Home Office ad wasn't offensive or harmful. But it was misleading.
"All advertisers, including Government, have to stick to the rules so we can trust the ads we see and hear."
A Home Office spokeswoman said: "We are pleased the ASA have concluded that our pilot was neither offensive nor irresponsible. We have always been clear that this campaign was about encouraging illegal immigrants to leave the country voluntarily and was not targeted at particular racial or ethnic groups.
"In respect of the ASA's other findings, we can confirm that the poster will not be used again in its current format."
Lord Lipsey said: "This ruling convicts the Government of misleading the public. Taxpayers' hard-earned cash has been squandered on paying for Government ads which tell porkies.
"I do not ask for (Home Secretary) Theresa May to resign. I ask for her to apologise, fully and frankly and if possible sincerely, for the outrage that she and her department have perpetrated."
Shadow home secretary Yvette Cooper said: "The ad vans sent out by the Home Office were a divisive gimmick and now the ASA has confirmed they were also misleading too.
"The ASA has now confirmed that the phrase "go home" was reminiscent of slogans used in the past to attack immigrants to the UK and that different language could have been used instead. They have also confirmed that the information used on the vans was misleading and should not be used again.
"The number of prosecutions for employing illegal migrants has halved since the election, fewer illegal migrants are being stopped at the border and fewer foreign criminals are being deported.
"As we said in the summer, if Theresa May was serious about tackling illegal immigration she would be concentrating on tackling problems at border control, deal with long delays in getting electronic checks in place and the bureaucratic failings at the UK Border Agency that have prevented foreign criminals being deported, rather than these kinds of shameful gimmicks.
"It's time the Home Secretary promised that she will ditch those ad vans and never again authorise Government slogans that are reminiscent of the 1970s' National Front."