Tumor microenvironment (TME) has been reported to exhibit a crucial effect in lung cancer. Therefore, this study was aimed to investigate the genes associated with TME and develop a risk score to predict the overall survival (OS) of patients with lung adenocarcinoma (LUAD) based on these genes. The immune and stromal scores were generated by the ESTIMATE algorithm for LUAD patients in The Cancer Genome Atlas (TCGA) database. Differentially expressed gene and weighted gene co-expression network analyses were used to derive immune- and stromal-related genes. The Least Absolute Shrinkage and Selection Operator (LASSO)-Cox regression was applied for further selection and the selected genes were inputted into stepwise regression to develop TME-related risk score (TMErisk) which was further validated in Gene Expression Omnibus (GEO) datasets. TMErisk-related biological phenotypes were analyzed in function enrichment, tumor immune signature, and tumor mutation signature. The patient's response to immunotherapy was inferred by the tumor immune dysfunction and exclusion (TIDE) score and immunophenoscore (IPS). According to our results, TMErisk was developed based on SERPINE1, CX3CR1, CD200R1, GBP1, IRF1, STAP1, LOX, and OR7E47P. Furthermore, high TMErisk was identified as a poor factor for OS in TCGA and GEO datasets, as well as in subgroup analysis with different gender, smoking status, age, race, anatomic site, therapies, and tumor-node-metastasis (TNM) stages. Higher TMErisk is also associated negatively with the abundance of B cells, CD4+ T cells, CD8+ T cells, neutrophils, macrophages, and other stromal or immune cells. Several genes of the human leukocyte antigen (HLA) family and immune checkpoints were less expressed in the high-TMErisk group. Mutations of 19 genes occurred more frequently in the high-TMErisk group. These mutations may be associated with TME change and indicate patients' response to immunotherapy. According to our analyses, a lower TMErisk score may indicate better response and OS outcome of immunotherapy.