Immediately after the Civil War began, Heckman enlisted in the 1st Pennsylvania Volunteer Regiment and was elected captain. Before seeing any action in that regiment he was appointed major of the 9th New Jersey Volunteer Regiment. On October 8, 1861 he became the regimental lieutenant colonel and joined Ambrose Burnside's expedition to North Carolina. He fought at Roanoke Island and was promoted colonel just two days after the battle. He was wounded at the battles of New Berne and Young's Crossroads. On November 29, 1862 he was promoted to brigadier general of U.S. volunteers.