If someone with F-2 visa comes to the US with her F-1 spouse, then they apply for EB2-NIW green card(in fact the F-1 visa holder as the primary applicant and F-2 visa holder as his dependent), then could get accepted and get their green cards, and after that they get divorce, what will happen for the wife who was the dependent applicant throughout all the procedure? Will her green card expires and she must leave the US?
Once a green card is granted it does not expire by operation of law upon a divorce. If immigration officials suspect that the marriage was fraudulent in the first place, they can seek to revoke the green card because it was obtained fraudulently if they can prove that in an appropriate court.
But, generally, divorce does not revoke a green card and the green card remains in force if it was issued before the divorce.