In 1861 in the Old South, Virgie Cary (Shirley Temple) is celebrating her sixth birthday in the ballroom of the family plantation. A family slave, Uncle Billy (Bill Robinson), dances for her party guests, but the celebration is brought abruptly to an end when a messenger arrives with news of the assault on Fort Sumter and a declaration of war. Virgie’s father (John Boles) is ordered to the Armory with horse and side-arms. He becomes a scout for the Confederate Army, crossing enemy lines to gather information. On these expeditions, he sometimes briefly visits his family at their plantation behind Union lines.
One day, Colonel Morrison (Jack Holt), a Union officer, arrives at the Cary plantation looking for Virgie’s father. Virgie defies him, hitting him with a pebble from her slingshot and singing “Dixie”. After Morrison leaves, Cary arrives to visit his family but quickly departs when slaves warn of approaching Union troops. Led by the brutal Sgt. Dudley (Guinn Williams), the Union troops begin to loot the house. Colonel Morrison returns, puts an end to the plundering, and orders Dudley lashed. With this act, Morrison rises in Virgie’s esteem.
One stormy night, battle rages near the plantation. Virgie and her mother are forced to flee with Uncle Billy when their house is burned to the ground. Mrs. Cary (Karen Morley) falls gravely ill but finds refuge in a slave cabin. Her husband crosses enemy lines to be with his wife during her last moments. After his wife’s death, Cary makes plans to take Virgie to his sister in Richmond. When Colonel Morrison learns of the plan, he aids Cary by providing him with a Yankee uniform and a pass. The plan is foiled, and Cary and Morrison are sentenced to death.
The two are confined to a makeshift prison where Virgie and Uncle Billy visit them daily singing “Polly Wolly Doodle”. A kindly Union officer urges Uncle Billy to appeal to President Lincoln for a pardon. Short on funds, Uncle Billy and Virgie sing and dance in public spaces and ‘pass the cap’. Once in Washington, they are ushered into Lincoln’s (Frank McGlynn Sr.) office where the President pardons Cary and Morrison after hearing Virgie’s story.
Finally, Virgie happily sings “Polly Wolly Doodle” to her father, Colonel Morrison and a group of soldiers.