Based on the previous research results that the addition of sucrose in the medium improved the biofilm formation of Tetragenococcus halophilus, the influence of sucrose on biofilm formation was explored. Moreover, the influence of exogenous expression of related genes sacA and galE from T. halophilus on the biofilm formation of L. lactis NZ9000 was investigated. The results showed that the addition of sucrose in the medium improved the biofilm formation, the resistance of biofilm cells to freeze-drying stress, and the contents of exopolysaccharides (EPS) and eDNA in the T. halophilus biofilms. Meanwhile, the addition of sucrose in the medium changed the monosaccharide composition of EPS and increased the proportion of glucose and galactose in the monosaccharide composition. Under 2.5% (m/v) salt stress condition, the expression of gene sacA promoted the biofilm formation and the EPS production of L. lactis NZ9000 with the sucrose addition in the medium and changed the EPS monosaccharide composition. The expression of gene galE up-regulated the proportion of rhamnose, galactose, and arabinose in the monosaccharide composition of EPS, and down-regulated the proportion of glucose and mannose. This study will provide a theoretical basis for regulating the biofilm formation of T. halophilus, and provide a reference for the subsequent research on lactic acid bacteria biofilms.