Sweeny commanded the Fifty-second Illinois at Fort Donelson. At Shiloh, in command of a brigade, he successfully defended a gap in the Union line. He was wounded in the battle having received two shots in his only remaining arm and a shot in one of his legs. Sweeny kept the field until the close of the fight, exciting the admiration of the whole army. He returned to command his regiment but returned to brigade command when General Pleasant A. Hackleman was killed at Corinth. He commanded the Second Division of the Sixteenth Army Corps in the Atlanta campaign. At the Battle of Atlanta Sweeny's division intercepted John B. Hood's flank attack. Sweeny got into a fistfight with his corps commander, General Grenville M. Dodge, when Dodge broke protocol and personally directed one of Sweeny's brigades during the fight. Sweeny received a court-martial for these actions but was acquitted. He mustered out of the volunteers in August 1865, and was dismissed for going AWOL by the end of the year.