Non-small-cell lung cancer (NSCLC) is one of the most devastating diseases worldwide. The study is aimed at identifying reliable prognostic biomarkers and to improve understanding of cancer initiation and progression mechanisms. RNA-Seq data were downloaded from The Cancer Genome Atlas (TCGA) database. Subsequently, comprehensive bioinformatics analysis incorporating gene ontology (GO), Kyoto Encyclopedia of Genes and Genomes (KEGG), and the protein-protein interaction (PPI) network was conducted to identify differentially expressed genes (DEGs) closely associated with NSCLC. Eight hub genes were screened out using Molecular Complex Detection (MCODE) and cytoHubba. The prognostic and diagnostic values of the hub genes were further confirmed by survival analysis and receiver operating characteristic (ROC) curve analysis. Hub genes were validated by other datasets, such as the Oncomine, Human Protein Atlas, and cBioPortal databases. Ultimately, logistic regression analysis was conducted to evaluate the diagnostic potential of the two identified biomarkers. Screening removed 1,411 DEGs, including 1,362 upregulated and 49 downregulated genes. Pathway enrichment analysis of the DEGs examined the Ras signaling pathway, alcoholism, and other factors. Ultimately, eight prioritized genes (GNGT1, GNG4, NMU, GCG, TAC1, GAST, GCGR1, and NPSR1) were identified as hub genes. High hub gene expression was significantly associated with worse overall survival in patients with NSCLC. The ROC curves showed that these hub genes had diagnostic value. The mRNA expressions of GNGT1 and NMU were low in the Oncomine database. Their protein expressions and genetic alterations were also revealed. Finally, logistic regression analysis indicated that combining the two biomarkers substantially improved the ability to discriminate NSCLC. GNGT1 and NMU identified in the current study may empower further discovery of the molecular mechanisms underlying NSCLC’s initiation and progression.