In this study, three chitosan quaternary phosphonium salts and three chitosan quaternary ammonium salts with varying spacer chain lengths were synthesized. Structure characterization of the obtained products was conducted using Fourier-transform infrared spectroscopy, nuclear magnetic resonance, thermogravimetric analysis, and elemental analysis. Additionally, the in vitro scavenging efficiency of these derivatives against 2,2-diphenyl-1-picrylhydrazyl (DPPH) and superoxide radicals, as well as their antibacterial activities against Escherichia coli (E. coli) and Staphylococcus aureus (S. aureus), were evaluated. The results indicated that the scavenging efficiency of the chitosan quaternary phosphonium salt at a concentration of 1.6 mg/mL ranged from 36.9 % to 48.7 % for DPPH free radicals and from 48.3 % to 66.3 % for superoxide free radicals, outperforming that of the chitosan quaternary ammonium salt with long alkyl chains. Furthermore, an increase in the length of the spacer alkyl chain was associated with enhanced antibacterial activities of the corresponding chitosan derivatives. At a concentration of 1.0 mg/mL, the synthesized chitosan derivatives demonstrated antibacterial rates exceeding 90 % against both E. coli and S. aureus. Notably, the CCK-8 assay confirmed that these derivatives are non-toxic to 293 T cells. Among the six derivatives, TPPBOC and DMDOC, characterized by longer spacer alkyl chains, demonstrated superior antioxidant and antibacterial activities. This research establishes a robust theoretical foundation for the development of more effective and safer antioxidants and antibacterial agents, thereby enriching the knowledge base in chitosan chemistry and functional materials, and paving new pathways for the innovation of novel antioxidant and antibacterial materials.