To investigate the effect of Porphyromonas gingivalis (Pg) infection on immune escape of oesophageal cancer cells and the role of YTHDF2 and Fas in this regulatory mechanism. We examined YTHDF2 and Fas protein expressions in esophageal squamous cell carcinoma (ESCC) tissues with and without Pg infection using immunohistochemistry and in Pg-infected KYSE150 cells using Western blotting. The interaction between YTHDF2 and Fas was investigated by co-immunoprecipitation (Co-IP). Pg-infected KYSE150 cells with lentivirus-mediated YTHDF2 knockdown were examined for changes in expression levels of YTHDF2, cathepsin B (CTSB), Fas and FasL proteins, and the effect of E64 (a cathepsin inhibitor) on these proteins were observed. After Pg infection and E64 treatment, KYSE150 cells were co-cultured with human peripheral blood mononuclear cells (PBMCs), and the expressions of T cell-related effector molecules were detected by flow cytometry. ESCC tissues and cells with Pg infection showed significantly increased YTHDF2 expression and lowered Fas expression. The results of Co-IP demonstrated a direct interaction between YTHDF2 and Fas. In Pg-infected KYSE150 cells with YTHDF2 knockdown, the expression of CTSB was significantly reduced while Fas and FasL expressions were significantly increased. E64 treatment of KYSE150 cells significantly decreased the expression of CTSB without affecting YTHDF2 expression and obviously increased Fas and FasL expressions. Flow cytometry showed that in Pg-infected KYSE150 cells co-cultured with PBMCs, the expressions of Granzyme B and Ki67 were significantly decreased while PD-1 expression was significantly enhanced. Pg infection YTHDF2-dependently regulates the expression of Fas to facilitate immune escape of esophageal cancer and thus promoting cancer progression, suggesting the key role of YTHDF2 in regulating immune escape of esophageal cancer.