On August 18, 1864, President Abraham Lincoln appointed Long a brigadier general in the volunteer army to rank from the same date. The President submitted the nomination to the U.S. Senate on December 12, 1864 and the U.S. Senate confirmed the appointment on February 14, 1865. Between November 16, 1864 and April 2, 1865, Long commanded the 2nd Division of the Cavalry Corps of the Military Division of Mississippi under Major General James H. Wilson. On April 2, 1865, during Wilson's Raid, Long was severely wounded in the head at the Battle of Selma, Alabama. During that battle he led the 2nd Division in a charge upon the entrenchments that resulted in the capture of that town.