Lincoln was as much a product of his time as any other important figure of his day. But he was always against slavery.
Except when Lincoln wrote, "If I could save the Union without freeing any slave, I would do it" in his 1862 letter to Horace Greeley.