Millions of soldiers hundreds of miles from home could not easily vote, and many civilians were trapped between opposing armies who frequently pillaged their lands and disrupted lines of communication. How did the US manage to hold a free and fair election during its largest, most costly war?
This older answer should be of interest.