The invention relates to a nano-silver chitosan gel foam preparation for treating vaginal bacterial inflammation, and a preparation method thereof, and belongs to the technical field of the foam preparation production. The preparation is composed of a nano-drug, a gel matrix, a surfactant, a cosurfactant, an oil phase, a foaming agent, an antiseptic, a solvent and a propellent. The preparation method comprises the steps of dissolving the gel matrix in deionized water to fully swell into a flow liquid; adding the surfactant and the cosurfactant in residue deionized water; adding the chitosan; stirring and heating to make the chitosan fully dissolved; mixing the above two solutions, adding the antiseptic, adding the nano-silver sol liquid after the mixture becomes uniform, stirring uniformly; weighing the oil phase and the foaming agent, adding the oil phase and the foaming agent to the above liquid, making into an emulsion solution via ultrasonic emulsification; loading the emulsion solution in a pressure bottle; adding the propellent to make the finished product of the nano-silver chitosan gel foam preparation. The gel foam preparation can kill bacteria quickly, is convenient for administration, is low in drug dosage, can decrease side effects, and eliminates potential safety risks caused by large application amount of the nano-silver.