Uncle Tom's Cabin is not a true story, but it is based in part on Harriet Beecher Stowe's first-hand experiences with slavery. She lived in Cincinnati for a time, a city located directly across the Ohio river from Kentucky, which was then a slave state. She could easily visit relatives and friends in Kentucky who owned slaves. The novel is also based on accounts of slavery she had read.
The Shelby family is loosely based on the slave owning families Stowe knew. Mr. and Mrs. Shelby, and Mrs. Shelby in particular, are kind-hearted slave owners who treat their slaves well. However, Stowe wanted to show that even among good people like those she knew, slavery was a terrible institution because of the power it gave white people over Black lives. It is too easy, for example, for Mr. Shelby to indulge himself, get into debt, and sell a few slaves to solve his own problems, not thinking clearly about the implications of this for the slaves.
Reacting to criticism from the South that she exaggerated the cruelty of slavery, Stowe compiled The Key to Uncle Tom's Cabin, a collection of true stories about slavery that confirmed the factual basis of her depiction of the treatment of slaves. This work showed she had not exaggerated. Thus, while all her characters are invented, they reflect the realities of Southern life before the Civil War.