In employment law, if you do not have a contract of employment specifically stating that you can only be terminated for cause, you are an "at will" employee. That means that you legally can be terminated at any time, with or without cause.
So, for the termination to be illegal, you'd have to establish an illegal motivation. You'd have to show that the employer discriminated based on race, religion, gender, age, disability or recent FMLA use. This can relate to being against you or for another. So, if someone is only hiring women because they are discriminating in favor of women and that can be illegal.
Here, if you are arguing that this employer is discriminating in favor of people from a certain nationality, you could make that argument to the Equal Employment Opportunity Commission and have them review the situation.
Now, I want to make it clear, there isn't any employment law claim available for people replaced by undocumented workers. By that, I mean that while it is illegal for an employer to hire someone that is not legally permitted to work here, that legal claim is between the employer and the government. There isn't another legal claim created where the replaced employee has a right to sue. You can certainly contact INS and report the employer for hiring undocumented workers, but you'd have no claim of action there.
Your only potential claim would have to come through demonstrating that the employer is purposefully discriminating in favor of a certain nationality, such that it suggests a discriminatory motivation.