The ways a foreign alien may acquire the status of a Permanent Resident of the United States (Green Card Holder) is independent of the grounds of inadmissibility codified in the Immigration and Nationality Act as amended and 8 CFR.
Any person wishing to enter the United States as an immigrant or non immigrant, must be admissible or if inadmissible the person must be statutorily eligible for a Waiver of inadmissibility also contained in the Immigration and Nationality Act.
The Green Card “through the lottery” is one of the ways to acquire the legal residence to the United States However, the person who “won” the right to be a resident through the lottery must be admissible at the time he won his or her right.
If a person is present in the United States and the person is in violation of the immigration laws ( undocumented alien) the fact that he won the right to become a permanent resident through the lottery does not exempt him from the process of establishing that he or she is an admissible alien.
Section 212 of the Immigration and Nationality Act contains the different grounds of inadmissibility that render an alien temporary or permanently barred from obtaining an immigrant visa (Permanent Resident Status).
Unlawful presence is an independent ground of inadmissibility that trigger sanctions that can range from 3 years to up to a 10 years and only certain aliens are eligible to request for a waiver of inadmissibility that if granted will not subject the alien to the 3 or 10 years bar to admission.
In the case of an undocumented alien who won the right to get Permanent Residence in the United States through the lottery process the fact that he was in violation of the immigration laws will possible prevent him from obtaining an approval of his immigrant visa if the period of unlawful presence triggered the 3 or 10 years bar, and if he is not the spouse or parent of a US Citizen or Permanent Resident Alien.
Therefore, having won the right to apply for a permanent resident status will not guarantee the right to become a permanent resident because the alien must still prove that he or she was admissible at the time he or she applied for the benefit.