Background: Although imatinib can effectively treat gastrointestinal stromal tumor (GIST), some patients are still resistant to it or cannot tolerate the adverse reactions of the drug. This study aimed to investigate potential miRNAs, mRNA and tumor-infiltrating lymphocytes (TILs) associated with the prognosis of imatinib-resistant GIST.Methods: mRNA, miRNA sequencing data and patient clinic traits of primary (imatinib-naive) and imatinib-resistant GIST were obtained from GEO (Gene Expression Omnibus) database. A systems biology approach combining Weighted co-expression network analysis (WGCNA) and differential expression analysis were utilized to detect the imatinib-resistant-related miRNA and gene modules and construct a miRNA-gene network. Tumor-infiltrating immune cells were analyzed by Estimating the Proportion of Immune and Cancer cells (EPIC) and Tumor-Immune System Interactions (TISIDB). miR-539 was measured by qRT-PCR. SPAG5 and APOBEC3B was measured by qRT-PCR and WB. Transforming growth factor (TGF)-β and interleukin (IL)-10 were assessed with enzyme-linked immunosorbent assay (ELISA). The proportions of CD4+ T cells, CD8+ T cells , NK cells and B cells in tumor-infiltrating lymphocyteswere analyzed via flow cytometry (FCM).Results: Two gene modules (brown and yellow) and one miRNA module were associated with the imatinib-resistant. Two hub genes (APOBEC3B and SPAG5) were associated with the imatinib-resistant. Three hub miRNAs were identified to be related to imatinib-resistant (miR-539, miR-376b and miR-18b). G1/S transition of mitotic cell cycle, G2/M transition of mitotic cell cycle, and cell proliferation were common pathways of the gene modules and miRNA module. apolipoprotein B mRNA editing catalytic polypeptide-like 3B (APOBEC3B) and Sperm-associated antigen 5 (SPAG5), which were both target genes of miR-539 was located at the core of miRNA–gene network. APOBEC3B (rho=0.509, p < 2.2e-16) and SPAG5 (rho=0.468, p < 2.2e-16) was positive correlated with the infiltration levels of activated CD4+ T cells. he proportions of CD4+ T cells, and the mRNA and protein relative expression of APOBEC3B and SPAG5 in imatinib-resistant tumor samples significantly increased as compared with tumor samples in imatinib-naive group. Imatinib-resistant tumor samples exhibited significantly downregulation of miR-539 and TGF-β1. Over-expression of miR-539 sensitized imatinib resistant GIST48 cells and increased the secretion of TGF-β1 by inhibiting APOBEC3B and SPAG5.Conclusion: APOBEC3B and SPAG5, the target genes of miR-539 may play as key factor for imatinib-resistant GIST by increasing the proportion of tumor-infiltrated activated CD4+ T cells via TGF-β1. These findings help to advance the understanding of imatinib-resistant GIST and provide potential therapeutic targets.