This study developed a simple method for synthesizing nitrogen-phosphorus-rich green multifunctional chemical agents for fire-retardant, UV-protective, and antibacterial cotton fabrics. Chitosan was obtained from chitin via deacetylation. Extracted chitosan was then chemically modified with melamine and sodium pyrophosphate as nitrogen and phosphorous sources, respectively, and glyoxal as a crosslinking agent. The structural, chemical and thermal properties of modified chitosan and multifunctional cotton fabrics were determined using FTIR, XRD, and TGA. The use of LOI and vertical flammability tests to evaluate the fire-retardant properties of treated cotton fabrics confirmed the fire retardancy imparted to the treated fabrics. The treated cotton fabrics also provided excellent UV protection and were highly effective at inhibiting the growth of tested gram-positive and gram-negative bacteria. The LOI and UPF for the highest concentration treatment were found to be more than 30 and 100 respectively whereas there was nearly 99% reduction in the bacterial colonies on treated cotton. Although the treatment had a negative impact on the mechanical properties of the fabrics, it was within acceptable limits for textile standards.