As I said elsewhere, I haven't read the book yet and I'm sure the initial aim of the war was to preserve the Union. However, following the Emancipation Proclamation this did change or, stated another way, the Union could only be preserved by ridding the nation of slavery.
In Lincoln's famous letter to Senator Albert Hodges of Kentucky in April 1864, he indicated that, with respect to the issuance of the Emancipation Proclamation, he was "in my best judgment, driven to the alternative of either surrendering the Union, and with it, the Constitution, or of laying strong hand upon the colored element. I chose the latter."
In 1864, when the War was going poorly, he was criticized from elements in the North because they suspected the war aims had changed from one to preserve the Union to one to eradicating slavery, which not everyone supported. It was probably only Sherman's victory in Atlanta that saved his Presidency and Lincoln was **lly prepared for the prospect of losing.
His letter to James Conkling in August 1863 (the **ll text of which can be accessed
here) is somewhat instructive. In it he states:
"You say you will not fight to free negroes. Some of them seem willing to fight for you; but, no matter. Fight you, then exclusively to save the Union. I issued the proclamation on purpose to aid you in saving the Union. Whenever you shall have conquered all resistence to the Union, if I shall urge you to continue fighting, it will be an apt time, then, for you to declare you will not fight to free negroes.
I thought that in your struggle for the Union, to whatever extent the negroes should cease helping the enemy, to that extent it weakened the enemy in his resistence to you. Do you think differently? I thought that whatever negroes can be got to do as soldiers, leaves just so much less for white soldiers to do, in saving the Union. Does it appear otherwise to you? But negroes, like other people, act upon motives. Why should they do any thing for us, if we will do nothing for them? If they stake their lives for us, they must be prompted by the strongest motive--even the promise of freedom. And the promise being made, must be kept."