I would recommend taking a look at Chandra Manning's What This Cruel War Was Over: Soldiers, Slavery and the Civil War. Manning talks about both Union and Confederate soldiers (usually from the "lower ranks", not high profile individuals) to try to understand the role slavery played in their understanding of the war. She argues that while few (but not none, to your question) Union soldiers joined the army specifically to end slavery, their interaction with slaves - who, for many northerners, were the first black people they'd ever met - caused them to see slavery as something worth destroying. She argues that this explains why the Union didn't see widespread desertion after the Emancipation Proclamation, as well as the elusive "shift" toward pro-emancipation sentiment in the Army as the war went on. Unfortunately, I don't have a copy of the book with me, so I can't quote specific examples from the book, but it's definitely worth checking out.
I'd also add the caveat that this book is considered controversial, and has been criticized by several Civil War historians (most notably, Gary Gallagher.) I think it's best to consider the sources discussed in Manning's book as part of the story, not the story.
Edit: one other note, I'm assuming that your question implicitly means white Union soldiers.