Carlo Lorenzini (who wrote under the name Carlo Collodi) lived from 1826 until 1890. Near the end of his life, he became entranced by the idea of writing the tale of a puppet who had a heart and a mind -- Le avventure di Pinocchio, they called it as they published it in weekly installments in Il Giornale dei Bambini, the first Italian newspaper for children.
Lorenzini died unaware of the fame that waited for his work; as in the allegory of the story, Pinocchio eventually went on to lead his own independent life, distinct from that of the author.