Tracy writes, "I am in a serious relationship with a man who is in the United States illegally for more than a decade. Since I am a US citizen, I was wondering if we can get married and I can legally sponsor him as my husband. What if he returns to his native country on his own and then returns to America as a legal immigrant? How will this process work?"
Until there is an amnesty (which will forgive all the laws that he has broken) of some kind, being illegally in the United States is not only a crime, it can trigger bans on reentry into the country, all the way of 10 years, or even lifetime, if a crime was committed. If your boyfriend leaves via a flight, his information will be entered into a database that will be available to the Department of Homeland Security (DHS) when they run a background check on him before issuing a visa. Depending on how he first entered the United States, they can generally develop a hypothesis if he was ever in the United States legally or illegally. It is common for undocumented aliens to cross the border back into Mexico (there is no immigration check on the US side if you want to leave and the Mexicans don't seem to care either who enters their country from the US) and if he entered the US without inspection, there is a possibility that DHS may have no record of his life in the US, but chances are that he may have had a fraudulent Social Security number or driver's license or filed taxes or done other acts, thus, providing details about him. Almost all Federal/State/local databases are accessible to the USCIS and State Department while deciding immigration applications.
In additions, both you and I will be required to provide (under oath) information about him and if he has ever visited the United States. Chances are that one way or the other the US Government will find out that he was in the US illegally and bar him from reentry. Your best option is to wait for an amnesty and if that does not make him eligible, hire an excellent immigration attorney because while extremely difficult, a good lawyer can still make a case for him to become legal (for example, by filing the USCIS Form I601A proving that separation of you two will be harsh on a US citizen), though, without legal advice, he should not leave the United States, because there is no guarantee that he will be allowed back in.