Ukrainka was born in 1871 in the town of Novohrad-Volynskyi of Ukraine. She was the second child of Ukrainian writer and publisher Olha Drahomanova-Kosach, better known under her literary pseudonym Olena Pchilka. Ukrainka's father was Petro Antonovych Kosach (from Serbian Kosača noble family), head of the district assembly of conciliators, who came from the northern part of Chernihiv province. After completing high school in Chernihiv Gymnasium, Kosach studied mathematics at the University of Petersburg. Two years later, he moved to Kyiv University and graduated with a degree in law. In 1868 he married Olha Drahomaniv, who was the sister of his friend Mykhaylo Petrovych Drahomanov, a well-known Ukrainian scientist, historian, philosopher, folklorist and public figure. Kosach, her father, was devoted to the advancement of Ukrainian culture and financially supported Ukrainian publishing ventures. Lesya Ukrainka had three younger sisters, Olha, Oksana, and Isydora, and a younger brother, Mykola. Ukrainka was very close to her uncle Drahomanov, her spiritual mentor and teacher, as well as her brother Mykhaylo, known under the pseudonym Mykhaylo Obachny, whom she called "Mysholosie."
Lesya inherited her father's features, eyes, height, and build. Like her father, she was highly principled, and they both held the dignity of the individual in high regard. Despite their many similarities, Lesya and her father were different in that her father had a gift for mathematics, but no gift for languages; on the contrary, Lesya had no gift for mathematics, but she knew English, German, French, Italian, Greek, Latin, Polish, Russian, Bulgarian, and her native Ukrainian.
Lesya's mother, a poet, wrote poetry and short stories for children in Ukrainian. She was also active in the women's movement and published a feminist almanac. Ukrainka's mother played a significant role in her upbringing. The Ukrainian language was the only language used in the household, and to enforce this practice, the children were educated by Ukrainian tutors at home, in order to avoid schools that taught Russian as the primary language. Ukrainka learned how to read at the age of four, and she and her brother Mykhaylo could read foreign languages well enough to read literature in the original.