With the outbreak of the Civil War, Heg was appointed by Wisconsin Governor Alexander Randall as colonel of the 15th Wisconsin Volunteer Regiment. Appealing to all young Norseman he said, “the government of our adopted country is in danger. It is our duty as brave and intelligent citizens to extend our hands in defense of the cause of our Country and of our homes.” The 15th Wisconsin was called the Scandinavian Regiment since its soldiers were almost all immigrants from Norway, with some from Denmark and Sweden. It was the only all Scandinavian regiment in the Union Army. On October 8, 1862, Colonel Heg led his regiment into its first action at the Battle of Perryville. Despite being under fire while being driven back several miles by the enemy, the 15th Wisconsin suffered few casualties and no fatalities. However, one of those hurt was Colonel Heg, who was injured when his horse fell.

Heg commanded the regiment during the Battle of Stones River. In response to his conduct at Stones River, Maj. Gen. William Rosecrans placed Colonel Heg in command of the newly formed 3rd Brigade of the 1st Division, XX Corps, Army of the Cumberland, on May 1, 1863.

On September 19, 1863, Colonel Heg led his brigade at the Battle of Chickamauga, where he was mortally wounded. Brave Col. Heg, commanding a brigade, “was shot through the bowels and died the next day.” Upon hearing of Heg’s death, Rosecrans expressed regret, saying he had intended to promote Heg to brigadier general. As it was, Colonel Heg was the highest-ranked Wisconsin soldier killed in combat during the Civil War.