The conventional process of imparting flame retardancy to cotton fabrics requires the consumption of large amounts of water, chemicals, and energy, which usually involves halogen-containing and phosphorus-containing chemicals. In this work, an eco-friendly sodium polyborate (SPB) foam was creatively introduced onto the cotton fabric surface by a bladed coater to improve the fire resistant performance. For the cotton sample with only 6.7% weight gain (WG) of SPB coating, the LOI value of cotton fabric (SPB treated cotton-1) was enhanced to 32.6% from 18.5%, the damaged length was decreased to 5.7 cm, and the sample self-extinguished in the vertical burning test. The peak of heat release rate value, total heat release value, and total smoke production (TSP) value decreased by 87.0%, 72.7%, and 22.2% respectively compared with those of the control sample. The TSP was further decreased by 80.6% when the WG of SPB was 16.7%. Besides, the SPB treated cotton showed enhanced antibacterial activities against S.aureus and E.coli. Particularly worth mentioning is in the SPB foam finishing procedure, no organic solvent and P or Cl-containing chemicals were involved, and the processing time was only around 3 min with obviously reduced water consumption, compared with dip-padding finishing. More importantly, SPB treated cotton kept good softness, whiteness, water vapor permeability, and air permeability. The SPB foam finishing in this work shows considerable potential in realize good flame retardancy on cotton fabrics by eco-friendly and high-efficient strategy.