Heiman served in the Confederate States Army during the American Civil War. Initially commissioned a Major in the Provisional Army of Tennessee; he served as an aide-de-camp to Brigadier Robert G. Foster before becoming an Assistant Adjutant-General of the Tennessee Military Department with the rank of Colonel. When the 10th Tennessee Infantry Regiment was raised he was elected as its colonel and commanding officer. When the regiment was stationed at Fort Henry; Heiman built Fort Heiman on the opposite bank of the river. When the Union Army emerged for the Battle of Fort Henry the regiment transferred to Fort Donelson where Heiman was given command of the brigade to which his regiment was assigned. When the fort surrendered in February 1862 he became a prisoner of war at Fort Warren in Boston and, gravely ill, was released after six months.