Randall Lee Gibson, an urbane, Yale-educated Confederate general, mocked black people as “the most degraded of all races of men.’’ Later, as a US senator from Louisiana, he helped broker the end of Reconstruction, freeing the South to harass and lynch blacks virtually at will.

In the 20th century, his orphaned son, Preston, was raised by an aunt and her husband, who had been a justice on the US Supreme Court that legitimated racial segregation in the infamous case of Plessy v. Ferguson.

At the beginning of the 21st century, a rent-a-car employee and genealogy buff dubbed himself Sir Thomas Murphy after tracing his mother’s lineage to English aristocracy. His father’s line remained a mystery.

None of these white people knew that they had African-American ancestors who had “passed for white.’’

Race has always been an inherently unstable construct of nature, culture, and law. Should one be considered black if one grandparent or great-grandparent was black? Or does the “one-drop’’ rule hold, that a single black forebear makes one black? Does “race’’ exist in the eye of the beholder, or solely in the mind of the beheld. In today’s age of mixed-race chic — in which Mariah Carey and Derek Jeter are hailed as beautiful royalty — such questions may seem quaint. But throughout American history, the consequences have been deadly.

“The Invisible Line,’’ Daniel J. Sharfstein’s spellbinding chronicle of racial passing in America, reminds us that the phenomenon has existed since our Colonial beginnings — as escape from oppression, enhancement in status, and path to economic opportunity. However well defined in law, the racial line has always remained porous, breachable under the right conditions.

Sharfstein may be a law professor, at Vanderbilt, but he approaches his subject with a storyteller’s verve and a novelist’s gift for the telling detail. Much like Isabel Wilkerson, in “The Warmth of Other Suns,’’ last year’s acclaimed account of 20th-century black migrations out of the South, he tells the larger story in microcosm, through the prism of family histories.

What Senator Gibson did not know was that his great-grandfather Gideon Gibson was a free man of color, and a substantial landowner and slaveholder, who led the “Regulators’’ to a successful back-country revolt in Colonial South Carolina. To his peers, the author contends, Gideon Gibson was neither black nor white but merely rich and respected. His marriage to a white woman further blanched his progeny, and their relocation to Mississippi and Louisiana allowed the family’s African-American past to fade away altogether.