The Academy award-winning actor will write "Sulwe" for Simon & Schuster Books for Young Readers.
According to the New York Times
the title comes from the word "star" in Nyong'o's native language, Luo.
The book, which will be aimed at children ages 5 to 7, will tell the story of a 5-year-old girl growing up in Kenya who struggles with having the darkest skin tone in her family.
"Sulwe is a dark skinned girl who goes on a starry-eyed adventure, and awakens with a reimagined sense of beauty," Nyong'o wrote in her announcement of the book on Instagram. "She encounters lessons that we learn as children and spend our lives unlearning. This is a story for little ones, but no matter the age I hope it serves as an inspiration for everyone to walk with joy in their own skin."
In 2014, the "Black Panther" actor gave a speech at the Essence 7th Annual Black Women in Hollywood event in which she spoke of receiving a letter from a young fan who told her: "I think you, you're really lucky to be this black but yet this successful in Hollywood over night."
Nyong'o said the girl also wrote: "I was just about to buy Dencia's Whitenicious cream to lighten my skin when you appeared on the world map and saved me."
"My heart bled a little when I read those words," the actor said.
Nyong'o said that she too had struggled with her complexion.
She spoke to the New York Times about her 2014 speech going viral.
"I felt really grateful that it had this impact," she said. "And at that time it occurred to me that there was an audience that this was resonating with, but the age group that really needed to hear this wouldn't necessarily hear the speech."
Nyong'o's book is expected to be published in January 2019.