Ransom was commissioned lieutenant colonel of the 1st North Carolina Infantry Regiment and later Colonel of the 35th North Carolina Infantry. This regiment was part of his brother Robert's brigade, which Matt later commanded. Ransom was promoted to Brigadier General on June 13, 1863. Ransom saw action in the battles of Seven Pines, the Seven Days Battles, Antietam, Fredericksburg, Plymouth, Weldon, Suffolk and the siege of Petersburg. He was wounded three times during the Civil War and finally surrendered at Appomattox.