Answer: They wanted to preserve the integrity of the United States.
Step-by-step explanation:
At the beginning of the Civil War, majority of the Union soldiers were fighting in order to keep the United States together. Southern states had seceded, thereby splitting the United States apart, and the war was now the only way to hinder secession from leading to a permanent condition. The United States integrity was now at stake, and majority of Union soldiers joined up with the belief they were fighting in order to preserve that integrity.
Men on both sides of the civil war were all inspired to fight by patriotism, the chance for adventure, state pride, steady pay. The union soldiers fought to preserve the Union and the common Confederate fought in order to defend their home.
Later in the war, an increasing numbers of Federal soldiers fought in order to abolish slavery. Confederate soldiers sometimes fought due to the reason that they feared Union victory would lead to a society where the black people were placed on an even footing with the whites.