The tumor microenvironment (TME) plays an important regulatory role in the progression of non-small cell lung cancer (NSCLC). Mesenchymal stem cells (MSCs) in the TME might contribute to the occurrence and development of cancer. This study evaluates the role of differentially expressed genes (DEGs) of MSCs and the development of NSCLC and develops a prognostic risk model to assess the therapeutic responses. The DEGs in MSCs from lung tissues and from normal tissues were analyzed using GEO2R. The functions and mechanisms of the DEGs were analyzed using the Gene ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG). Additionally, the Cancer Genome Atlas (TCGA) database was used to determine the expression levels of the DEGs of MSCs in the NSCLC tissues. The prognostic factors of NSCLC related to MSCs were screened by survival analysis, meta-analysis, Cox regression analysis, and a prognostic risk model and nomogram was developed. The signaling mechanisms and immune roles that risk model participate in NSCLC development were determined via Gene Set Enrichment Analysis and CIBERSORT analysis. Compared to the normal tissues, 161 DEGs were identified in the MSCs of the lung tissues. These DEGs were associated with mechanisms, such as DNA replication, nuclear division, and homologous recombination. The overexpression of DDIT4, IL6, ITGA11, MME, MSX2, POSTN, and TRPA1 were associated with dismal prognosis of NSCLC patients. A high-risk score based on the prognostic risk model indicated the dismal prognosis of NSCLC patients. The nomogram showed that the age, clinical stage, and risk score affected the prognosis of NSCLC patients. Further, the high-risk model was associated with signaling mechanisms, such as the ECM-receptor interaction pathways, cytokine-cytokine receptor interaction, and MAPK pathways, involved in the progression of NSCLC and was also related to the components of the immune system, such as macrophages M0, T follicular helper cells, regulatory T cells. Therefore, the risk model and nomogram that was constructed on the basis of MSC-related factors such as POSTN, TRPA1, and DDIT4 could facilitate the discovery of target molecules that participate in the progression of NSCLC, which might also serve as new candidate markers for evaluating the prognosis of NSCLC patients.