Though Memoirs of a Geisha is a work of fiction, it heavily relies on the real life story of Mineko Iwasaki and draws upon the true experiences of many women who lived and worked as Geisha in Japan. A Geisha is a woman who dedicates her life to the preservation of the traditional Japanese arts of singing, dancing, shamisen, drum, and textiles. In Japan, prior to the 1930s, artists like this made up a vital part of city society. After the invasion of American and British soldiers, the arts culture of Japan suffered severely, and the world of Geisha has never quite returned to the status it once held.
Memoirs tells a story of a little girl from a poor fishing village. Her father can no longer care for her or her sister, so they are sold to a man who takes them into the city for work. This sounds like a heartless thing for a father to do, but he made the decision knowing that in the city they would have homes, food, and income-- something he could no longer give them. While Sayuri (the protagonist) is sold to an okiya where Geisha live, her sister is sold to a brothel. Such is the harsh truth of poverty the world over.
Sayuri's life in the okiya is hard at first. In truth, young women who enter the okiya, even today, must prove their determination by adhering to a very strict and rigorous schedule of work. When Sayuri is not taking classes at the dance school-- a thriving institution of pre-war Kyoto-- she is cleaning and attending to the other women of the okiya. She comes to learn that if she works hard and really dedicates herself to the life set up for her, she can be as successful as the other Geisha she serves and have more agency in her life. This was true for some Geisha, who became very successful and decided to "buy" their way out of the life by paying off the people who previously financially supported them. Sometimes a woman's patrons who came to see her dance or sing would fall in love and propose to her. Other than these means, illness, or a complete failure to adhere to the training, women generally did not leave the career.
Putting this story in the historical context of pre-war and World War II Japan is fundamentally important. With the invasions of Japan during the Second World War, all artistic and public leisure spaces were shut down. This included the teahouses where Geisha performed, their schools, and even the homes they lived in. Some women were lucky enough to have a wealthy customer who might secure them a life outside of the city. Others had to go work in factories or sell their garments and instruments. When the Gion district where Sayuri works is made to close, she is lucky to have a patron who can provide for her, even if she isn't very fond of him.
Sayuri's narrative of rags-to-riches brings to life many aspects of life in Japan before Westernization took hold. Most importantly, the traditional arts of performance, aesthetic beauty, and garments with their histories extending back more than a thousand years. Sayuri's story surrounds the height of Geisha culture and the "flower and willow world" and how this all fell apart during the war.
There is much more to the story of Geisha before, during, and after World War II, but unrelated to Memoirs. For more information, I highly recommend Mineko Iwasaki's Geisha, A Life, and the books of Liza Dalby.