The play is written by Danai Gurira, who is know as samurai sword-wielding Michonne on "The Walking Dead", reported E!Online.
Nyong'o, 32, will make her New York stage debut in the production, which is also the play's NYC premiere.
"Eclipsed" is set during the Liberian Civil War and follows the captive wives of a rebel officer.
"Danai Gurira has written a brilliant play, ripped from the headlines, that looks at the terrible conflicts in post-colonial Africa with an eye that is both incisive and deeply compassionate," Public Theater artistic director Oskar Eustis said in a statement.