He had huge success for his comedies, but his real passion was social commentary, promoting the education of women and meaningful marriage.
When he was 23, Gaspar y Rimbau married Enriqueta Batllés y Bertán de Lis, a beautiful aristocrat, to the displeasure of her parents.
He spent time in Greece and France, then Madrid, and eventually served as consul in China, first in Macau, and then in Hong Kong.
Upon his return to Europe, he moved to Oloron, in the South of France, though his family lived in Barcelona, where he put on an opera in Catalan.
Published in 1887 in Barcelona, El anacronópete (a neologism for "who flies against time") has become one of Gaspar y Rimbau's most important works.
The anacronópete is an enormous cast iron box, propelled by electricity, which drives four large pneumatical devices ending in tubes for travel, as well as powering other machinery, including something that produces the García fluid, which causes the passengers not to grow younger as they travel backwards in time.
The machine provided the setting for a story in three acts, in which the following group of characters travels in time: don Sindulfo García, a scientist from Zaragoza and the inventor of the device; his friend and assistant Benjamín; Clara, don Sindulfo's niece and ward; a maidservant; Captain Luis, Clara’s beloved; several Spanish hussars; and a number of old French women of "loose morals" that the mayor of Paris wants to rejuvenate so that they "regenerate" themselves.
The machine departs, returning to Paris the day before they left, whereupon several "rejuvenated" French girls disembark.
In the second act, they again travel into the past, seeking the secret of immortality, stopping at various moments in history, such as Granada in 1492, where they recommend to Queen Isabella that she should listen to a certain Genovese gentleman, and Ravenna in 690 (in order to obtain provisions).
The empress had actually been buried alive by her husband and happens to be the original of a Chinese mummy Sindulfo had bought and brought into the machine.
Benjamín discovers that the disappearing hussars have reappeared again because their immortal spirits had not left the anacronópete and that Sindulfo's first wife was the same as the empress through metempsychosis.