The majority of Union soldiers were primarily motivated to serve in the Union Army by a desire to preserve the Union during the Civil War, not to abolish slavery in the United States.
True, radical abolitionists were motivated to join the Union Army to fight to abolish slavery in the United States, but most northern European-Americans who fought for the Union during the Civil War were every bit as racist as most southern European-Americans. They were primarily motivated to fight the military forces of the Confederate States of America to preserve the Union, not specifically to abolish slavery in the United States.
Most northern European-Americans harbored a deep racist view of African-Americans, and they did not want to have African-Americans permanently or even temporarily residing in their states and communities.
Indeed, the majority view amongst the Free State advocates who settled in Kansas Territory during the 1850s was to ban any African-Americans from permanently residing in Kansas Territory.
Most European-Americans who opposed slavery in the antebellum United States weren’t abolitionists, but were “free-soil advocates” who were fine with slavery existing where it already existed, but opposed the spread of slavery to the new territories of the West.
Indeed, African-Americans in most northern states were commonly denied basic civil rights, and were formally subject to a multitude of restrictions in their daily lives that were comparable to the restrictions on the civil rights and freedoms of slaves in the South, save the reality that African-Americans in the North were not the formal chattel property of racist European-Americans.
Some European-Americans of the North came to see the Civil War as a war to free African-Americans from slavery, but the deeply ingrained racism in American culture permeated the cultural ideals of both the North and South. Radical abolitionists were viewed as the lunatic fringe element of society that were a danger to the fabric of society, and most northern European-Americans shared the southern European-American view of African-Americans being biologically, intellectually and culturally inferior to European-Americans. They most certainly were not willing to risk their lives for the sake of freeing African-Americans from slavery.
Indeed, the reason that John Brown was believed to be insane was because he believed in the equality of African Americans and European-Americans and was willing to fight and die to abolish slavery and give African-Americans equal civil rights and social equality in American life.
The mainstream antebellum American culture, both North and South, was steeped in a racist philosophy that believed in the racial superiority of European-Americans over all other races, and therefore, when northerners marched south to fight the Confederate States of America, the majority of European-American northerners were motivated by a desire to preserve the Union, not particularly to abolish slavery, while a minority of radical abolitionist European-Americans were motivated by a deep commitment to the abolitionist cause to fight the Civil War.