The party's annual conference in Brighton on Tuesday backed a proposal being pushed by home affairs spokesman and rising star Nick Clegg.
He said that the Lib Dems should not "pander to fear" or take part in a "bidding war" between Labour and the Conservatives on immigration.
Clegg said it was a "liberal, enlightened, progressive approach to immigration" to deal with a "sharp increase in public anxiety".
His policy paper backed an amnesty for those who have been in the UK for at least 10 years.
They would be given the right to earn full citizenship and work and access services if they have a clean criminal record, pass language tests and demonstrate a long-term commitment to the UK.
This would be proved by family ties, employment patterns and an ability to sustain themselves and their dependents. A financial charge would also be payable, but redeemable against community services.
Migrants would then be eligible for a two-year work permit, leading to full citizenship if successful.
Clegg claimed that government attempts to deport members of this "underclass" are unrealistic, with ministers not even knowing how many illegal immigrants are in Britain.
Some estimates suggest it could be as much as 600,000, with the policy paper arguing that the country would be better off if they were able to contribute to the economy. Clegg said it would bring in a "massive amount of money" through income tax and national insurance.
However he admitted that he could not say how many illegal immigrants have been in Britain for more than 10 years and that it would by definition be "difficult" for some to prove the length of their residency.
He added that he had rejected a rival call for a full amnesty for all migrants due to fears that it would encourage human trafficking, but suggested the 10-year period would be subject to review.
The move would also be coupled by a beefed-up border security force to stop more people entering the UK illegally and greater planning and funding for the impact of immigration on affected communities through real time population data.
Clegg told the conference that: "Britain currently has an underclass of about half a million people who are here illegally. They don't pay tax. They lack any employment rights, citizen rights, or access to services from healthcare to banking.
"And it would cost £11,000 to deport each and every one of them, as the Tories and Labour absurdly claim they will.
"But they haven't got a clue how to do it; they don't even know where most of these people are. Instead of this fantasy politics of mass deportation, I want us to advocate an earned route to citizenship, beginning with a two-year work permit, for irregular migrants who have been in the UK for many years.
"So we can focus our enforcement efforts not on
The Liberal Democrats are to support a "selective" amnesty for illegal immigrants.
families who've been here for years, but on people-traffickers, on criminal gangs and on strengthening our border controls.
"Because these people have lived outside the law, potentially for many years, I believe it is right that they pay a charge, or do community service, as part of the process of gradual legalisation."
Click to view image: '96466-cleggargles436.jpg'
|Liveleak on Facebook|