Born at Tamworth, he was educated at Bridgnorth Grammar School and St John's College, Cambridge (senior classic, 1853; fellow, 1854). On 13 August 1861 he had married Mary Ann Mathilda Ermen, the daughter of Peter Albert Ermen. From 1866 to 1868 he was professor of jurisprudence at University College, London, and from 1872 to 1874 commissioner of endowed schools. In 1874 he joined the firm of Ermen and Engels, sewing cotton manufacturers, which soon afterwards changed its name to Ermen and Roby. This was the firm that Friedrich Engels began worked at in 1842 and how he acquired first hand knowledge of the working conditions. From 1890 to 1895 he was Member of Parliament in the Liberal interest for the Eccles division of Lancashire.
He wrote An Elementary Latin Grammar in 1862. The book by which he is perhaps best known is his Grammar of the Latin Language from Plautus to Suetonius, a storehouse of illustrative quotations from Latin literature, but his most important works deal with Roman law--Introduction to Justinian's Digest (1884), and Roman Private Law (1902).