His father, Federico María Barreto served as a colonel in the Peruvian army, while his brother was Federico Barreto, a poet. Barreto himself was known to be very reserved, so much so that his nickname was "el lugubre" (the gloomy).[1]
Barreto lived in Tacna during the Chilean occupation of Peru after the War of the Pacific. As a journalist, he advocated for the Peruvian identity of the territory through writing alongside his brother. In 1911, the Chilean government forced him to leave Tacna, so he moved to Lima and was appointed director of El Peruano. To avoid attracting unwanted attention, his works were published under pseudonyms such as Joseph Marius, René Tupic and Ramón Román.[2]
He was a member of the Royal Academy of History and the Royal Geographical Academy of Madrid, The Academies of History and Geography of Brazil and Bolivia, and the International Law Association of Washington.[2]
His diplomatic career began in 1925, being appointed as general secretary of the Peruvian delegation to Tacna and Arica, which were at the time under the control of Chile. He represented Peru in missions to Mexico, Bolivia, Venezuela, France, Panama, Germany and Switzerland, additionally serving in the Peruvian delegation to the League of Nations.[3]