Keckley found herself in North Carolina then in St. Louis, where she finally was able to purchase her freedom. She made her way to Maryland and the Washington D.C. area, where she worked as a seamstress. After one of her dresses was created on short order, her client offered to introduce Keckley to a friend — Mary Todd Lincoln, wife of President Abraham Lincoln. Impressed, Mrs. Lincoln hired Keckley as her personal modiste (hatmaker).
Years later, Keckley wrote about her life from enslaved woman to employee at the White House. She wrote the preface to her book, Behind the Scenes, or, Thirty Years a Slave and Four Years in the White House, on March 14, 1868:
I have often been asked to write my life, as those who know me know that it has been an eventful one. At last I have acceded to the importunities of my friends, and have hastily sketched some of the striking incidents that go to make up my history. My life, so full of romance, may sound like a dream to the matter-of-fact reader, nevertheless everything I have written is strictly true; much has been omitted, but nothing has been exaggerated... A cruel custom deprived me of my liberty, and since I was robbed of my dearest right, I would not have been human had I not rebelled against the robbery... A solemn truth was thrown to the surface, and what is better still, it was recognized as a truth by those who give force to moral laws. An act may be wrong, but unless the ruling power recognizes the wrong, it is useless to hope for a correction of it. Principles may be right, bust they are not established within an hour... As one of the victims of slavery I drank of the bitter water; but then, since destiny willed it so, and since I aided in bringing a solemn truth to the surface as a truth, perhaps I have no right to complain. Here, as in all things pertaining to life, I can afford to be charitable.