He had begun by studying art, but in 1860 enlisted as a volunteer under Garibaldi. The next three years were spent in Syria as secretary to Ernest Renan, and on his return to Paris he embarked in militant journalism against the Second French Empire in Le Figaro, the Diable à quatre, and eventually in the Rappel, with which his name was thenceforward intimately connected. He commanded a battalion during the siege of Paris, and in February 1871 was elected deputy to the National Assembly where he sat on the extreme left and protested against the preliminaries of peace.
In March he signed the proclamation for the election of the Paris Commune, and resigned his seat as deputy. Arrested at Vanves he remained a prisoner at Versailles and Chartres until June when he was released without being tried. He was more than once imprisoned for violent articles in the press, and in 1872 for a duel with Paul de Cassagnac.
He was returned to the Chamber in 1873 as Radical deputy for Bouches-du-Rhône in 1876, 1877 and 1881 for Aix, and in 1881 he was also elected in the 11th arrondissement of Paris. He elected to sit for Paris, and was repeatedly re-elected. During the elections of 1893 he was shot at by a cab-driver poet named Moore, but was not seriously injured. For the first ten years of his parliamentary life he voted consistently with the extreme left, but then adopted a more opportunist policy, and gave his unreserved support to the Brisson ministry of 1885.
In the new Freycinet cabinet formed in January he held the portfolio of commerce and industry, which he retained in the Goblet ministry of 1886–1887. In 1885 he had been returned at the head of the poll for Paris, and his inclusion in the Freycinet ministry was taken to indicate a prospect of reconciliation between Parisian Radicalism and official Republicanism. During his tenure of the portfolio of commerce and industry he made the preliminary arrangements for the Exposition of 1889, and in a witty letter he defended the erection of the Eiffel Tower against artistic Paris.
After the Panama and Boulangist scandals he became one of the leading politicians of the Radical party. He was vice-president of the Chamber in 1894 and in 1895, when he became minister of marine under Léon Bourgeois. His drastic measures of reform alarmed moderate politicians, but he had the confidence of the country, and held the same portfolio under Henri Brisson (1898) and Charles Dupuy (1898–1899).
He gave his support to the Waldeck-Rousseau Administration, but actively criticized the marine policy of Camille Pelletan in the Combes ministry of 1902–1905, during which period he was again vice-president of the Chamber.
M. Lockroy was a persistent and successful advocate of a strong naval policy, in defence of which he published:
- La Marine de Guerre (1890)
- Six mois rue Royale (1897)
- La défense navale (1900)
- Du Weser a la Vistule (1901)
- Les Marines française et allemande (1904)
- Le Programme naval (1906)
His other works include M. de Moltke et la guerre future (1891) and Journal d'une bourgeoise pendant la Revolution (1881) derived from the letters of his great-grandmother. M. Lockroy married in 1877 Madame Charles Hugo, the daughter-in-law of the poet.