[2] In 1850 he returned to Lima, and joined the Nuestra Señora de Guadalupe National College [es] as a professor of Moral Philosophy, Psychology, Logic, and Theodicy.
In 1852 he was appointed director of the same, replacing his brother Pedro Gálvez and he printed a marked liberal tendency in the studies, contrasting with the conservative orientation followed in the Carolina convictorio.
After the victorious battle of La Palma (January 5, 1855), he was appointed rector of the Convictorio de San Carlos, where he strove to counteract the influence of Herrera.
In 1857 Castilla dissolved the National Convention, an attitude that turned Gálvez into a staunch opponent, collaborating in the newspaper El Constitucional (April 3 to August 1, 1858).
In 1865 he was elected dean of the Lima Bar Association [es] and from that inauguration he criticized the passive attitude of President Juan Antonio Pezet in the face of the aggression of the Spanish Pacific Squad, for which reason he was again exiled to Chile.
When, in April 1866, he found out about the manifesto made from the armoured frigate Numancia by Admiral Casto Méndez Núñez, commander of the Spanish Squad, threatening to bombard Callao within four days.
[2] Gálvez assumed the direction of the defense of the port and He built a series of batteries, located to the north and south, placing the weak and few warships in the center.
A bomb from the Spanish frigate Almansa [es] entered through one of the doors and fell into some gunpowder warehouses, causing an immense explosion that destroyed the tower of La Merced, where Gálvez was, along with some officers and soldiers.
Originally, the design was to have the bust of Gálvez at its top, but later it was agreed to replace it with the statue of Victory, since it was considered that the monument should pay homage to all the defenders of Callao and not just to a particular individual.