The Oscar-winning actor told BBC Newsnight that colourism "is the daughter of racism" in "a world that rewards lighter skin over darker skin".
Nyong'o was raised in Kenya, before moving to the United States.
She was speaking ahead of the release of her children's book, Sulwe, about a girl with darker skin than her family.
Colourism is prejudice against people who have a darker skin tone or the preferential treatment of those who are of the same race but lighter-skinned.
"I definitely grew up feeling uncomfortable with my skin colour because I felt like the world around me awarded lighter skin," the Black Panther star told Newsnight's Emily Maitlis.
She said her younger sister, whose skin was lighter, was called "beautiful" and "pretty".
"Self-consciously that translates into: 'I'm not worthy'."
Nyong'o, who won a best supporting actress Oscar for 12 Years a Slave, said colourism was "very much linked to racism" despite the fact she experienced it in a predominantly black society like Kenya.
"We still ascribe to these notions of Eurocentric standards of beauty, that then effect how we see ourselves among ourselves," she said.
The actor said she was once told at an audition that she was "too dark" for television.
But Nyong'o said the relationship to her skin had been separate to the relationship to her race.
"Race is a very social construct, one that I didn't have to ascribe to on a daily basis growing up," she said. "As much as I was experiencing colourism in Kenya, I wasn't aware that I belonged to a race called black."
That changed when she moved to the US, "because suddenly the term black was being ascribed to me and it meant certain things that I was not accustomed to."
Nyong'o played Nakia in Marvel's superhero film Black Panther, which took more than a billion US dollars (£794m) at cinemas worldwide.
Asked whether the film's success had changed the casting experience for black actors, Nyong'o told Newsnight: "I think time will tell whether this has been that pivotal shift. It definitely feels that way."