The United States Government was no longer "established". It was constitutionally and lawfully disestablished by acts of the People of the South.
Its writ no longer ran in the South, the People having repudiated it, as it was and is their God-given right to do.
No it was not. Their actions were not legal.