Hasking was in command of the Baton Rouge Barracks when the Civil War began. He was forced to surrender on January 10, 1861 to the Confederate forces in Louisiana. He was exchanged and assigned to the staff of John E. Wool with the rank of lieutenant colonel.