Grant wrote his autobiography pretty much entirely out of desperation to provide for his family after his death. He had lost everything he had in a Ponzi scheme and was heavily in debt as he was dying from cancer, and the autobiography was his last chance to make money for his family.