To date, there have been no reports on tertiary lymphoid structures (TLS) in primary adenocarcinoma of jejunum and ileum. In this study, we employed digital pathology image analysis software to classify and quantify TLS, and evaluated the maturity of TLS using immunohistochemistry. Molecular genetics and immunotherapy biomarker detection were performed using next-generation sequencing technology, such as tumor mutational burden (TMB) and microsatellite instability (MSI). The aim of this study was to investigate the presence, location, maturity, association with immunotherapy biomarkers, and prognostic value of TLS in primary adenocarcinoma of jejunum and ileum. Compared to secondary follicle-like TLS (SFL-TLS), intra-tumoral TLS (IT-TLS) were more likely to manifest as early TLS (E-TLS) (P = 0.007). Compared to IT-TLS, SFL-TLS had a higher propensity to occur at the invasive margin(IM) (P = 0.032) and showed a trend towards being more prevalent at the tumor periphery (P = 0.057). In terms of immunotherapy biomarkers, there was a higher trend of IM-TLS density in PD-L1(22C3) score CPS < 1 group compared to PD-L1(22C3) score CPS ≥ 1 group (P = 0.071). TMB-H was significantly associated with MSI-H (P = 0.040). Univariate survival analysis demonstrated a correlation between high SFL-TLS group and prolonged disease free survival (DFS) (P = 0.047). There was also a trend towards prolonged DFS in the E-TLS-high group compared to the E-TLS-low group (P = 0.069). The peri-tumoral TLS (PT-TLS)-high group showed a trend of prolonged overall survival (OS) compared to the PT-TLS-low group (P = 0.090). In conclusion, the majority of TLS were located at the invasive margin and tumor periphery, predominantly consisting of mature TLS, while IT-TLS were mainly immature. Notably, TMB was closely associated with MSI and PD-L1, indicating potential predictive value for immunotherapy in primary adenocarcinoma of jejunum and ileum.