Maybe. As Chaz pointed out, South Carolina was a different country and the Fort was on their territory. The Feds were given plenty of notice to leave.
Note that not all states seceded at once. Some didn't secede until after the fall of Fort Sumter, some after Lincoln invaded Virginia. Note that Virginia never attacked Fort Sumter, yet Lincoln attacked them anyway solely because they seceded. Invading a country is an act of war.
https://www.ushistory.org/us/32e.asp
![]()
https://www.ushistory.org/us/33.asp
![]()
The U.S. constitution explicitly gives the federal government the authority to use military force to suppress insurrections