Immigration officials detained members of the Windrush generation "unlawfully and inappropriately" despite their right to be in the UK, MPs have found.
A parliamentary committee has published its report into the Windrush scandal, describing the Home Office's treatment of individuals as "shocking".
Officials required standards of proof "which went well beyond those required", the inquiry found.
It has called for a "fundamental change in the law, culture and procedures".
The Windrush scandal began to be uncovered in April of this year when it emerged that some migrants from Commonwealth countries, who were encouraged to settle in the UK from the late 1940s to 1973, were being wrongly categorised as illegal immigrants.
They were part of what is known as the Windrush generation - a reference to the Empire Windrush - the ship that brought workers from the West Indies to Britain in 1948.
Some who had lived and worked in the UK for years - were threatened with deportation or refused jobs and healthcare.
Their treatment coincided with the Home Office's adoption of a hardline "hostile environment" approach, designed to tackle the issue of illegal immigration.
In the report published on Friday, MPs and peers on the Joint Committee on Human Rights said the Home Office demonstrated a "wholly incorrect approach to case-handling and to depriving people of their liberty".
Individuals were locked up unless they could satisfy officials they should not be detained - an approach with the report described as "simply unlawful".
"It is for the Home Office to satisfy itself that it has a power to detain an individual - not for an individual to have to satisfy the Home Office that they should not be detained," the report said.
The report added: "The Home Office required standards of proof from members of the Windrush generation which went well beyond those required, even by its own guidance; and moreover were impossible for them to meet - and which would have been very difficult for anyone to meet.
"This led to officials making perverse decisions about their status. Moreover, it seems that if those standards were not met, Home Office officials then considered that they had grounds to detain."
The committee examined two cases of Windrush migrants - Anthony Bryan, 60, and Paulette Wilson, 62 - who were both detained after being unable to show documents proving their immigration status.
Mr Bryan and Ms Wilson both came to Britain from Jamaica as children in the 1960s. Giving evidence to the committee in May, Mr Bryan agreed with a suggestion that a factor in the way he was treated was because he was black.
Grandfather Mr Bryan was held in a detention centre twice, for almost three weeks, last year while Ms Wilson was detained for a week.
The committee said their experience in detention was "traumatising and debilitating".
The case files showed that immigration officials dismissed "ample information and evidence" for the pair's right to be in the UK, the report said.
Some of the evidence discounted by officials included their own accounts of their lives as well as testimonies from family members, people who had known them for decades and lawyers.
The report said that detention powers should not be used for people living in the UK and who are unlikely to abscond, the report said.
"Detention powers have been used unlawfully and inappropriately by the Home Office without assuring itself that it had a right to deprive individuals of their liberty," it said. "There should be fundamental change in the law, culture and procedures to protect human rights in the work of the Home Office."
Harriet Harman, the committee chairwoman, said what had happened to Mr Bryan and Ms Wilson had been "a total violation of their human rights by the state's most powerful government department".
She said some members of the Windrush generation had been treated "shockingly" and "shamefully" and she called for additional safeguards to be put in place.
"What you've got to have is a system which allows - when something's going wrong - the individual to check it and there to be proper monitoring," she told Radio 4's Today.
"There's no independent situation at all. So you've got Home Office officials literally ticking the box for somebody to be detained."
The inquiry rejected the Home Office's claim that the treatment of Mr Bryan and Ms Wilson was due to a "a series of mistakes". It said the explanation was not "credible of sufficient" and that a "systemic failure" is more likely the reason.
Earlier this month, more than 2,000 people attended a thanksgiving service marking 70 years since the arrival of Caribbean migrants on the Windrush ship.
The migrants were among the first to be recruited to rebuild post-war Britain.
In 1971, all Commonwealth citizens already living in the UK were given indefinite leave to remain.
There are now 500,000 people resident in the UK who were born in a Commonwealth country and arrived before 1971 - including the Windrush arrivals - according to estimates by Oxford University's Migration Observatory.
Earlier this month, Home Secretary Sajid Javid pledged a "fresh look" at rules and said key parts of the UK's immigration policy will be reviewed.