Ferulic acid (FA) is a natural antibacterial agent rich in plants, FA has excellent antioxidant and antibacterial properties. However, because of its short alkane chain and large polarity, FA is difficult to penetrate the soluble lipid bilayer in the biofilm to enter the cell to play an inhibitory role, limiting its biological activity. To improve the antibacterial activity of FA, with the catalytic condition of Novozym 435, four alkyl ferulic acid esters (FCs) with different alkyl chain lengths were obtained by fatty alcohols (including 1-propanol (C3), 1-hexanol (C6), nonanol (C9), and lauryl alcohol (C12)) modification. The effect of FCs on P. aeruginosa was determined by Minimum inhibitory concentrations (MIC), minimum bactericidal concentrations (MBC), Growth curves, alkaline phosphatase (AKP) activity, crystal violet method, scanning electron microscopy (SEM), membrane potential, PI, cell contents leakage. Results showed that the antibacterial activity of FCs increased after esterification, and the antibacterial activity significantly increased and then decreased with the extension of the alkyl chain of the FCs. Hexyl ferulate (FC6) showed the best antibacterial activities against E. coli and P. aeruginosa (MIC for E. coli was 0.5 mg/ml, MIC for P. aeruginosa was 0.4 mg/ml). And Propyl ferulate (FC3) and FC6 showed the best antibacterial activities S. aureus and B. subtilis (MIC for S. aureus was 0.4 mg/ml, The MIC of B. subtilis was 1.1 mg/ml). In addition, the growth, AKP activity, bacterial biofilm, bacterial cell morphology, membrane potential and cell contents leakage of P. aeruginosa after different FCs were investigated, which found that FCs could damage the cell wall of P. aeruginosa and showed different effects on the P. aeruginosa cell biofilm. FC6 showed the best inhibition on the biofilm formation of P. aeruginosa cells, which caused the surface of P. aeruginosa cells to be rough and wrinkled. Some P. aeruginosa cells showed aggregation and adhesion, even rupture. The membrane hyperpolarization was obvious, which appeared as holes, leading to cell contents leakage (protein and nucleic acid). All these results concluded that the antibacterial activities FCs against foodborne pathogens depended on different fatty alcohol esterification of FA. FC6 showed the best inhibition on P. aeruginosa due to its effect on P. aeruginosa cell walls and biofilms and the leak of the cell contents. This study provides more practical methods and a theoretical basis for giving full play to the bacteriostatic effect of plant FA.