According to the 'Genealogical Record of the Barnum Family,' he was a member of Captain Armstrong's Company "A", 53rd NY, enlisting in September, 1861. However, the military record of James Barnum, soldier of the 53rd New York, says that he was born in 1840/41. This appears to be a different James Barnum.
Research by Anne Philiben indicates that this James G. Barnum was a blacksmith and he enlisted 13 Aug 1862 in Company "G", 12th New York Infantry. He died of gunshot wounds on 18 Jul 1863, at Fort Wagner, South Carolina.