According to an article in the Baltimore Sun, this could be quite the case, and not to be surprised about:
A new twist to an intriguing family history:
Census records, genealogical research indicate forbears of Obama's mother had slaves
But an intriguing sliver of his [Barack Obama] family history has received almost no attention until now: it appears that forebears of his white mother owned slaves, according to genealogical research and Census records.
According to the research, one of Obama's great-great-great-great grandfathers, George Washington Overall, owned two slaves who were recorded in the 1850 Census in Nelson County, Ky. The same records show that one of Obama's great-great-great-great-great-grandmothers, Mary Duvall, also owned two slaves.
Reitwiesner's research identifies two other presidential candidates, Republican Sen. John McCain of Arizona and former Democratic Sen. John Edwards of North Carolina, as descendants of slave owners. Three of McCain's great-great-grandfathers in Mississippi owned slaves, including one who owned 52 in 1860. Two ancestors of Edwards owned one slave each in Georgia in 1860.