"Classrooms without textbooks, or an atlas, or even a map pinned to a wall. A school where the teachers beg to be sent books to tell them how to teach, they being only 18 or 19 themselves. I tell … how everybody begs for books: 'Please send us books.'"

These were among the late Doris Lessing's opening remarks when, aged 88, she became the oldest person to accept the Nobel prize for literature.

The novelist was recalling a visit in the early 1980s to a school in Zimbabwe, a country where she lived for a quarter of a century, which she explored in vivid prose and to which she will now bestow a posthumous gift.

More than 3,000 books from Lessing's personal collection are to be donated to the country's leading public library in the capital, Harare.

The bequest includes biographies, histories, reference books, poetry and fiction. It has been welcomed by public services strained by years of neglect and underfunding; many libraries in Zimbabwe have no budget to buy new books.

Bernard Manyenyeni, the mayor of Harare, told the Herald newspaper: "It is most heartening to hear that Doris Lessing, with this magnificent gesture, has taken her love for this country beyond her death.

"We have every reason to feel special to have earned this much in her wishes – we are delighted and grateful as any city would be."

Lessing was born in Tehran but grew up in Zimbabwe (then Southern Rhodesia), where she lived from 1924 to 1949 after her family settled there to farm maize.

She set off for Harare (then Salisbury) to work as a telephone operator and married young in 1939, only to divorce four years later and remarry.

She returned in 1956, but was declared a prohibited migrant after speaking out about the white minority regime.

She was allowed back in 1982 and after 1988 she nurtured two initiatives for reading and learning through libraries. Lessing referred to the people of Zimbabwe as "the most passionate readers anywhere in the world".

In 2007 she famously came back to her home in West Hampstead, north London, carrying heavy bags of shopping, to find her doorstep besieged by reporters and camera crews. "Oh, Christ," she said, on learning that she had won the Nobel prize. She died last November aged 94, having written more than 50 novels ranging from the political to science fiction.

Her first, The Grass is Singing, is set in Zimbabwe and deals with racial politics.

Earlier this month staff from her publisher, HarperCollins, and the charity Book Aid International spent a day in Lessing's former London home, sorting and packing up her library.

They described finding books not just in every room but on shelves in every space where shelves could be fitted, in hallways, under stairs – "there were books everywhere".

Impressed by the variety and breadth of the library, Vanessa Bloor of HarperCollins described it as "a collection to aspire to".

A member of her family, who did not wish to be named, said: "The donation is being made by various beneficiaries under the will.

"In making the donation, the estate and the beneficiaries have responded to a request from the Africa Community Publishing and Development Trust, one of the agencies Doris Lessing worked with in Zimbabwe, that books not needed for a special collection at the University of East Anglia (UEA) be brought to Zimbabwe in honour of her memory and legacy in the country.

"In light of consultations conducted in Zimbabwe, agreement has been reached that the recently refurbished Harare city library would be an appropriate home for the collection not only because Doris Lessing lived for some years in Harare, but because she cared deeply about the country and facilitating access to books in Zimbabwe."

Panashe Chigumadzi, a Zimbabwean writer, said: "Dare I say this speaks volumes of Doris Lessing? For over half a century, Lessing was one of the most inventive and imaginative writers to come, not only from Zimbabwe, but the world. For at least fifty years she gifted the world with a novel, so it seems fitting that she donated the 3,000 books to the library."

Christopher Bigsby, a friend of Lessing's for 30 years and professor of American studies at UEA, to which Lessing left her books, told the Guardian: "Sometimes books belong to other people than those who own them.

"In this case, they are finding their way to the place where she was raised and where she herself had her imagination fired by the books sent out to her from England and where others can now have that same liberating experience."

Book Aid International, which has been sending books to Zimbabwe since 1959, was asked to help with the logistics.

Harriet Beaumont, its communications manager, said: "During her life Lessing was a strong supporter of Book Aid International, so we are particularly glad to be able to help carry out her wishes."

Harare city library, which is more than 100 years old, was recently refurbished with the help of a $1m (£600,000) grant from the Swedish government.

It is hoped that the Lessing collection will arrive in time for a literary festival later this year with her family, friends and Zimbabwean writers.

Selection of books from the personal collection of Doris Lessing:

Heinemann Book of Contemporary African Short Stories, Achebe, Chinua, Heinemann (2008);

Millennium People, Ballard, JG, HarperPerennial (2004);

Zimbabwe Before 1900, Beach, DN, Mambo Press (1984);

Dew in the morning, Chinodya, Shimmer, 1982 Mambo Press (1982);

Women and the Environment in the Third World: Alliance for the Future (IUCN Sustainable Development Series) Dankelman, Irene, 1988;

The Dinosaur Hunters: the Story of a Scientific Rivalry and the Discovery of the Prehistoric World;

On Trying to Keep Still, Diski, Jenny,Time Warner Books (2006);

The Little Ice Age: How Climate Made History 1300-1850, Fagan, Brian;

Intimate Death: How the Dying Teach Us to Live, Hennezel, Marie de [0316639699] Little, Brown;

African Calliope: a Journey to the Sudan, Hoagland, Edward, Penguin Books;

A Palace in the Old Village, Jelloun, Tahar Ben, Arcadia;

Death of a Dissident, Litvinenko, Marina, Simon Schuster UK (2007)

The Heinemann Book of African Poetry in English (African Writers Series), Maja-Pearce, Adewale, Charles William Heinemann Ltd;

The Setting Sun and the Rolling World, Mungoshi, Charles William Heinemann Ltd;

Leonardo da Vinci: the Flights of the Mind, Nicholl, Charles, Allen Lane (2004);

The Naming of Names: the Search for Order in the World of Plants, Pavord, Anna, Bloomsbury;

Dead Certainties: Unwarranted Speculations, Schama, Simon, Granta Books (1998);

Long Overdue: Book About Libraries and Librarians, Taylor, Alan F, Mainstream;

World Tales: the Extraordinary Coincidence of Stories Told in All Times, in All Places; Shah, Idries;

The Short Story in English, Besner, Neil, Oxford University Press (2012)