He wrote the declaration of independence which states that all men are equal. So what was he thinking when he wrote that but still owned slaves?
I would start by pointing you to the following article, which describes his view in how abolition should take place (note it was in stages, and not ending slavery over night) and that he believed freed slaves would become a burden on society. I think this would help to show you his reasoning, even if we see it today as flawed.
http://www.monticello.org/site/plantation-and-slavery/thomas-jefferson-and-slavery
I would also note that he did free a few slaves in his lifetime, along with purchasing some slaves in order to keep a few slave families (somewhat) together. More here:http://www.monticello.org/site/plantation-and-slavery/property
And finally, as noted in the link above, in 1806 Virginia passed a law requiring all freed slaves to leave the state of Virginia within one year of freedom. Obviously this would be a crushing situation for any recently freed slave and their family to deal with, as most wouldn't know much outside of their general area or have anywhere to go.