Upon the outbreak of the war, Van Lew began working on behalf of the Union with her mother, caring for wounded soldiers. When Libby Prison was opened in Richmond, Van Lew was allowed to bring food, clothing, writing paper, and other things to the Union soldiers imprisoned there. She aided prisoners in escape attempts, passing them information about safe houses and getting a Union sympathizer appointed to the prison staff. Recently captured prisoners gave Van Lew information on Confederate troop levels and movements, which she was able to pass on to Union commanders. She even helped hide escaped Union prisoners and Confederate deserters in her own mansion.