A major and lieutenant colonel of North Carolina volunteers in 1861-1862, Lane became brigadier general in the Army of Northern Virginia after the Battle of Sharpsburg (1862). Lane's troops were involved in some of the hardest fighting of the Civil War, particularly at the battles of Gettysburg and Spotsylvania, and in the Wilderness Campaign of 1864. They inadvertently killed General Thomas (Stonewall) Jackson and later were present at Appomattox for Lee's surrender to Grant.
After the war, Lane returned to teaching. He became professor of Civil Engineering at Alabama Polytechnic Institute (now Auburn University) in 1882 where he taught until his death in 1907. After 1891, Lane held the commission of State Statistical Agent for the U. S. Department of Agriculture.
Lane married Charlotte Randolph of Richmond, Virginia in 1869. They had four daughters. Lane was a Democrat and an Episcopalian. He wrote extensively about the Civil War for the "Southern Historical Society Papers" and received an honorary doctorate in philosophy from West Virginia University in 1896.