For foreign nationals who are in the U.S. with no immigration papers, starting a small business, even if it means just selling a few things informally, can seem like a natural way to earn some income. In many cases, they have U.S. family members with a restaurant, grocery, food truck, or service business, and have been helping out there. But what are the legal ramifications if they'd like to branch out on their own?
Welcome to one of the great unresolved questions of immigration law. You're asking the same question thousands of other undocumented business owners probably have. Many of them went ahead and started businesses anyway, and have, for the most part, encountered few barriers from government regulators, banks and institutional lenders, or even immigration enforcement authorities.
Here's the deal: U.S. immigration law (which is federal, meaning it's followed throughout the country), does not say anywhere that an undocumented immigrant is barred from owning a business. The law makes being in the U.S. without permission unlawful by itself, of course; this act is punishable by deportation and various bars on return to the U.S. after removal or other departure.
There have even been cases where an undocumented person was caught in the U.S. and business ownership was actually viewed as a point in their favor when defending against deportation, especially when proof of compliance with tax laws is readily available. However, this might not always be the case, and this should not be taken as saying that starting a business will prevent deportation. Deportation is a very case-specific determination.
The United States doesn't exactly open the door to entrepreneurs who are here illegally. And, relatedly, U.S. law makes it illegal for someone to employ an undocumented worker. This comes from the Immigration Reform and Control Act, or IRCA (found at 8 U.S. Code § 1324a.) Businesses that hire undocumented workers may be sanctioned with fines, asset forfeitures, and in instances of repeated violations, criminal arrest.
These penalties can also be applied to an undocumented person who is a business owner that hires other undocumented people. In that case, the undocumented business owner could face multiple immigration violations. Yet U.S. enforcement authorities have apparently not tried to use this section of IRCA to argue that a business owner is both employer and employee, and therefore violating hiring laws. (Still, it could happen.)
The bottom line is that no lawyer can confidently tell you that it is illegal to start a business if you are an undocumented person in the U.S.; and by the same token, no lawyer can advise you to go ahead and do so. (That shouldn't stop you from consulting a lawyer to find out the latest word on this matter, however, and whether you might have other options to regularize your immigration status.)
Whatever you do, make sure to abide by other U.S. laws governing small businesses, such as those regarding permits, health codes, labor laws, and so forth. See these articles on Small Business for more information.