Born in Oneglia (today part of the city of Imperia), he went to the Military Academy of Modena, and became an Army officer in the new Kingdom of Italy.
Edmondo fought in the battle of Custoza during the Third Italian War of Independence, a defeat of Savoy forces against the Austrian Empire; the spectacle left him disappointed, and contributed to his later decision to leave military life.
Its praise for the creation of the united Italian state in the previous decade contributed to its reception, but also led to criticism from some Roman Catholic politicians for failing to depict the nature of the Holy See's opposition to the annexation of Rome.
His book Cuore has been considered for decades an educative textbook largely read and studied in the Italian public schools.
Some literary critics noted it substituted the traditional Roman Catholic doctrine with a lay civil religion where heroes took the place of Christian martyrs, the Statuto Albertino displaced the Gospels, the Church, its believers and the Ten Commandments were respectively deleted in favour of the State, the figure of the citizen and the protection of the Italian codes of laws.