A Home Office review identified the group as having come to the UK from the Caribbean before 1973 and stayed permanently, but were unable to prove their continued residence in the country.
Of the group of 18, the review found 11 left the UK voluntarily while the remaining seven were detained but subsequently released without being removed.
The Home Office has so far contacted 14 of the 18, with those who are not currently in the UK being given the option to return and made aware of their possible right to compensation.
Home Secretary Sajid Javid said: “The experiences faced by some members of the Windrush generation are completely unacceptable and I am committed to righting the wrongs of the past.
“I would like to personally apologise to those identified in our review and am committed to providing them with the support and compensation they deserve.
“We must do everything we can to ensure that nothing like this happens again – which is why I have asked an independent adviser to look at what lessons we can learn from Windrush.”
The figures were revealed in a letter from Mr Javid to Labour MP Yvette Cooper, the chair of the House of Commons’ home affairs committee, in which he provided an update on the government’s response to the Windrush scandal.
In total, 6,507 people have now been referred to caseworkers on the government’s Windrush taskforce since it was established in April.
Some 2,272 have been issued with documentation to confirm their right to remain in the UK.
Earlier this year, Mr Javid’s predecessor Amber Rudd resigned as home secretary amid the scandal over the treatment of the Windrush generation; who are named after the cruise ship that brought one of the first large groups of West Indians to Britain.
Anyone who entered the UK before 1973 is legally entitled to live in the country but, despite having been in the UK for the majority of their lives, many began to experience issues as a result of tightened immigration requirements.
It saw some Windrush generation residents, who might never have felt the need to apply for a UK passport before, left without the documentation now required by officials.
Critics blamed Prime Minister Theresa May for the Windrush scandal, after she chased a “hostile environment” strategy towards illegal immigration during her own time as home secretary.