Objective To investigate the effect and mechanism of sodium butyrate (NaB) on the activation of Epstein-Barr virus (EBV) in EBV-positive gastric cancer cells. Methods EBV-positive gastric cancer cells (AGS-EBV cells) were divi-ded into groups A, B, and C, and the cells in group A were cultured routinely for 12 hours, while those in groups B and C were treated with NaB for 12 and 24 hours respectively. Transcriptome sequencing was performed for the genes of AGS-EBV cells and the EBV genes, and groups A, B, and C were compared in terms of the relative expression levels of key latent genes and key lytic genes of EBV in cells. Differentially expressed genes (DEGs) were identified between groups A, B, and C, and the top 5 upregula-ted DEGs and the top 5 downregulated DEGs with smaller P values were considered significant DEGs, while RT-qPCR was used to measure the relative expression levels of significant DEGs. The GO functional enrichment analysis and the KEGG pathway enrichment analysis were performed for all DEGs identified, and the proteins enriched in significant pathways (the pathways with P<0.05 in the KEGG pathway enrichment analysis) were considered key pathway proteins, while Western blotting was used to mea-sure the relative expression levels of key pathway proteins in groups A, B, and C. The DEGs in groups A, B, and C were compared with the transcription factors in the AnimalTFDB/PlantTFDB database, and the top 5 transcription factors with smaller P values were selected as core transcription factors, while RT-qPCR was used to measure the relative expression levels of core transcription factors in groups A, B, and C. Results Compared with group A, groups B and C had significant increases in the relative expression le-vels of key latent genes (EBNA-1, EBNA-3A, EBNA-3B, EBNA-3C, EBNA-LP, LMP-1, LMP-2A, LMP-2B and RPMS1) and lytic period genes (BZLF1, BRLF1 and BHLF1) (t=2.67-14.36,P<0.05), and group C had significantly higher expression levels of these genes than group B (t=2.21-6.97,P<0.05). Compared with group A, group B had significant increases in the relative expression levels of SCN1A, RFPL4AL1, RORB, and CACNG7 in cells (t=2.81-13.93,P<0.05) and significant reductions in the relative expression levels of MIR205HG, PLAAT4, and OAS2 (t=4.47-623.30,P<0.05); compared with group A, group C had significant increases in the relative expression levels of NLRP5, SCN1A, RFPL4AL1, RORB, CACNG7, and PLA2G2E (t=4.32-7.43,P<0.05) and significant reductions in the relative expression levels of RS17P11, MIR205HG, PLAAT4, and OAS2 (t=3.44-1 510.00,P<0.05). Compared with group A in terms of the core transcription factors, groups B and C had significant increases in the relative mRNA expression levels of EGR1, PGR, and SOX2 (t=3.22-16.60,P<0.05) and significant reductions in the relative mRNA expression levels of CEBPD and E2F3 (t=4.18-28.59,P<0.05). Compared with group A, group B had significant reductions in the relative expression levels of p65, p-p65, AKT, and p-AKT (t=2.87-5.93,P<0.05), and compared with group A, group C had significant reductions in the relative expression levels of p65, p-p65, AKT, and p-AKT and a significant increase in the expression level of p-ERK (t=5.72-8.92,P<0.05). Conclusion NaB promotes the activation of EBV in EBV-positive gastric cancer cells by activating the MAPK signaling pathway and inhibiting the NF-κB pathway, and the core transcription factor EGR1 promotes the activation of the virus by facilitating the transcription of the EBV lytic genes BZLF1 and BRLF1.