The first African woman to win the Nobel Peace Prize, Wangari Maathai, has told the BBC she wrote her autobiography to give hope to others.
Wangari Maathai won the Nobel peace prize in 2004
She said she was always asked about her upbringing and what inspired her campaign for the environment, so she decided to share her experiences.
She writes of how her activism led from dark days in prison to world acclaim.
"Even young people, who come from very humble backgrounds like me, can feel they too can do something," she said.
"You have to use whatever opportunities come your way."
Mrs Maathai said her divorce from her husband was the most painful and deeply personal experience of her life, but being thrown into prison during President Daniel arap Moi's government was also very difficult.
"I had small children and I didn't know how they were reacting. They were old enough to understand that mummy was in jail but were not old enough to understand why," she told the BBC's Network Africa programme.
Her autobiography Unbowed, published by Knopf, is being launched in Nairobi.
"There I was, dressed to kill with my beads in a cell that was cold, dank, filthy, smelly and crowded, with no room to sit down, water was all over," she writes.
"Later I was put into a concrete, maximum-security cell with four other women and given a uniform, a pan to use as a toilet, and a blanket. the women warders also cut off my braids."
In the book, she recalls that in 1989 when she was battling the construction of a building complex on the only green park in the capital, Nairobi, Members of Parliament interrupted their house business to discuss her and express their outrage at her position:
"To the cheers of a packed house, one MP said that because I had supposedly repudiated my husband in public, I could not be taken seriously and that my behaviour had damaged his respect for all women."
During the debate, her Green Belt Movement, mostly of women who planted trees to combat the devastating effects of deforestation and desertification, was described as a "bogus organisation" in which she spent all her time travelling abroad, by another MP.
She said that pain and suffering is not invited but comes because of the path you have chosen to walk.
"Life is a journey - sometimes it is pleasant and sometimes it is painful - but the important thing is to make the best of it and that is what I tried to do."
The Nobel Peace Prize awarding committee described Mrs Maathai as "a source of inspiration for everyone in Africa fighting for sustainable development, democracy and peace".
She became an environmental campaigner after planting some trees in her back garden.
This inspired her to set up the Green Belt Movement in 1977.
Her campaign to mobilise poor women to plant some 30 million trees has been copied by other countries.
She was elected to parliament in 2001, and became deputy environment minister in 2003.