James O. Luby, Confederate soldier, lawyer, Duval County official, rancher, and Republican party leader, was born on June 14, 1846, in London, England, to Daniel and Kate (Smith) Luby. In 1854 his widowed mother took him to New York, where he attended the public schools. After traveling to Cuba to visit his mother, who had remarried, Luby moved to New Orleans in 1861. There he enlisted in the First Louisiana Infantry under Col. A. H. Gladden and took part in the Confederate attack on Santa Rosa Island, the bombardment of Fort Pickens, and the engagement with the Richmond and Niagara. He served in Brig. Gen. Jones Mitchell Withers's division of Maj. Gen. Braxton Bragg's corps at Shiloh. After his enlistment ended, Luby returned to New Orleans and joined the Pickwick Rifles of the Fourteenth Louisiana Infantry. When federal forces captured New Orleans in April 1862, he was taken prisoner. After being paroled by federal general Benjamin F. Butler, he worked briefly in Brownsville, Texas, for the Cameron county clerk's office. Luby was involved in a formal prisoner exchange in 1864 that permitted him to rejoin Confederate forces at the battle of Palmito Ranch under John S. Ford.
After the war Luby served eighteen months as a captain in the Mexican Liberal army, which was fighting French forces. He moved to San Diego, Texas, in February 1867 and obtained a federal appointment as postmaster from 1867 to 1884. Between 1871 and 1876 he was a member of the Duval County Commissioners Court and served as a justice of the peace. He also read law and joined the bar in 1878. He was elected Duval county judge in 1876 and held that office until 1882. President Chester A. Arthur named him collector of customs at Brownsville, where he was employed in 1884–85. After returning to San Diego in 1886, Luby won election to another two-year term as county judge but was defeated for reelection in 1888 by J. Williamson Moses.
He invested in land and cattle to become a leading rancher. He was president of the Pioneer Freighters Association and a member of the Old Trail Drivers Association. He married Mary J. Hoffman in Corpus Christi in December 1871; the couple had five children. Luby was a Republican. He died in San Diego on December 8, 1932, and was buried there.