James Barnes was born in Boston, Massachusetts, on December 28, 1801. Upon graduation from the Boston Latin School, he went into business for some years, but later secured an appointment to the Military Academy, from which he was graduated in the class of 1829. He worked at West Point as an instructor until his resignation from the army in 1836. Until the outbreak of the Civil War, Barnes was a civil engineer for railroads in New York, Massachusetts, Virginia, North Carolina, and the Midwest. Appointed colonel of the 18th Massachusetts in July 1861, he served commendably with the Army of the Potomac in the Washington defenses and in the Peninsular campaign, and was appointed a brigadier general of volunteers on November 29, 1862. At Sharpsburg, Fredericksburg, and Chancellorsville he commanded a brigade in Morell's division of the V Corps. Temporarily placed in command of the 1st (Griffin's) Division of the corps after Chancellorsville, he seems to have lost control of his troops at Gettysburg (though Vincent's brigade of his division seized and held Little Round Top at the instance of General Gouverneur K. Warren and probably saved the battle for the Union). He was wounded here, and upon his return to service was posted to garrison and prison duty for the balance of the war. On March 13, 1865, he was brevetted major general of volunteers "for Meritorious Services during the Rebellion" and was mustered out of service early the following year. In 1868 he was appointed to a United States commission to investigate the building of the Union Pacific Railroad and telegraph line. He died in Springfield, Massachusetts, on February 12, 1869, and was buried in Springfield Cemetery.
Reference: Generals in Blue. Lives of the Union Commanders by Ezra J. Warner. Louisiana State University Press. Baton Rouge.