Mary Anna Randolph Custis, the only surviving child of George Washington Parke Custis and Mary Lee Fitzhugh Custis, was born at Annfield, in Frederick County , Virginia. Her birth year was thought to be 1808, but contemporary documents show that she actually was born on October 1, 1807. Her father was the grandson of Martha Custis Washington through her first marriage to Daniel Parke Custis, and Mary was raised in the highest social circle of the young republic. When young George's father died unexpectedly, he was adopted by the Washingtons and raised at Mount Vernon , an experience that powerfully shaped both him and his daughter.

Mary Custis was given an unusually fine education. Her studies emphasized history, literature, and philosophy, as well as Greek and Latin. A French tutor made special mention of Mary's "incomparable qualities," and she also excelled at drawing, for which she had a marked talent.

Her most notable education, however, came through exposure to America's greatest personalities at her father's estate, Arlington. Situated across the Potomac River from the nation's capital, Arlington was designed to house the Washington memorabilia that Custis had amassed. Custis also had a rich store of anecdotes about his grandparents, and people traveled considerable distance to hear his reminiscences. As a result, Mary grew up conversing with leaders such as John Marshall and the Marquis de Lafayette . These experiences fostered a keen interest in politics and culture that never left her.

From her father Mary inherited a heroic past; from her mother she learned ways to shape the future. "Molly" Custis, also descended from Virginia's notable families, was a lady of unusual sympathy—a "woman in a thousand" wrote one admirer. Strongly religious, she taught her daughter the importance of spiritual values and the need to live them out. Early in the 1820s Molly Custis helped form a remarkable coalition of women who hoped to eradicate slavery. They frequently worked through the American Colonization Society , an organization that advocated gradual emancipation and the resettlement of freed slaves in Africa. The movement was supported by leaders such as James Madison and Henry Clay. Although criticized for its inability to envision a racially mixed society, it nonetheless made early strides in harnessing political power to the antislavery cause.

Molly Custis worked tirelessly for the American Colonization Society, but personally moved beyond the group's expectations. She unconditionally freed all of her own slaves and eventually persuaded her brother, daughter, and husband to follow suit. She tried to soften the harsh conditions of slavery for those who remained in bondage, taking risks to educate them, allowing an unusual margin of personal liberty, and respecting family groups. From a young age, Molly Custis also embraced this ethos. She attended United States Supreme Court hearings on slave cases, taught slave children, and helped to raise funds for the American Colonization Society. Years later, she wrote a will leaving her personal fortune to support aging Arlington slaves and to further antislavery work.

Within Arlington's exceptional atmosphere Mary Custis grew into a poised young woman. Friends recalled not only her artistic abilities, but her intelligence and talent to amuse. "You would love this sweet modest girl, so humble & gentle with all her classical attainments. She has wit & satire too, when they are required," noted her aunt "Nelly" Custis Lewis. Her unassailable confidence could edge into arrogance, however, and she was sometimes critical and careless. Still, her lovely dark hair and chestnut eyes—as well as her inheritance—attracted many suitors. But she called herself an "impregnable fortress" and in turn refused marriage offers from Sam Houston, distinguished cousins, and two sons of Revolutionary War hero "Light-horse Harry" Lee. "There are few worthy of her I think," remarked her aunt.

In 1830, with the death of William Henry Fitzhugh , her mother's adored brother, Mary Custis underwent a profound transformation. Stunned at her uncle's inexplicable demise, she began to embrace evangelical religion. For years her mother had followed the teachings of the Second Great Awakening, with its emotional surrender to a just, but inscrutable, God and rejection of transient worldly pleasures. For Mary Custis, this was the beginning of a spiritual quest that would become the guiding priority of her life, giving her an aspiration and emotional independence apart from domestic concerns.

It was during this catharsis that Mary Custis embraced the man who would become her life partner. Robert Edward Lee was a distant cousin and a childhood playmate, the younger brother of the two Lees who had already sought her hand. Newly graduated from the United States Military Academy at West Point, New York, he had been jarred by the recent death of his mother. The couple shared their love of literature, nature, and horseback riding during the summer of 1830 and by September they were engaged. However, the Lees had been marked by financial and sexual scandal and George Washington Custis was reluctant to approve the marriage. After some months of agonized waiting, his daughter convinced him to let the wedding go forward. On June 30, 1831, she and Lee were married at Arlington, before their relatives and friends. The gaiety of the occasion, remarked one guest, was "a piece of Virginia life, pleasant to recall."