The fall of Rosas after his defeat at the Battle of Caseros (1852) allowed Mármol to return to Argentina. After an exile that had lasted thirteen years, he was elected a senator and later a national deputy from the province of Buenos Aires. The secession of Buenos Aires from the Argentine Confederation prevented him from serving as plenipotentiary to Chile, a post to which he had been appointed. However, he later served as plenipotentiary to Brazil. In 1858 he became director of the Biblioteca Nacional de la República Argentina, until blindness forced him to retire. He died in Buenos Aires in 1871. By coincidence, his two most notable successors in the office of chief librarian, Paul Groussac and Jorge Luis Borges, also suffered from blindness in their old age.