Objective To explore the expression levels of non-coding long stranded RNA (lncRNA) -GAS5, lncRNA UCA1, and microRNA (miR) -29a-3p in primary lung cancer and their relationship with prognosis. Methods Four hundred and two patients with primary lung cancer treated at Xi'an Central Hospital from January 2020 to December 2023 were selected as a lung cancer group, including 196 males and 206 females. They were (58.87±6.31) years old. All the patients took lobectomy. Another 402 healthy individuals who had physical examination in the hospital during the same time period were selected as a healthy control group, including 179 males and 223 females. They were (59.31±5.96) years old. The expression levels of lncRNA-GAS5, lncRNA UCA1, and miR-29a-3p in the serum of the subjects were detected by real-time fluorescence quantitative polymerase chain reaction (PCR). After 12 months' follow-up, the patients were divided into a survival group and a death group according to their survival prognostic outcomes. t and χ2 tests were used for the statistical comparisons. The binary logistic regression were used to analyze the influencing factors of the patients' prognosis, and to assess the relationship of lncRNA-GAS5, lncRNA UCA1, and miR-29a-3p with their prognosis. Results Among the 402 patients, 162 cases died, with a mortality rate of 40.30%. The expression levels of lncRNA-GAS5 and miR-29a-3p in the lung cancer group were lower than those in the healthy control group (both P<0.05), while the expression level of lncRNA UCA1 was higher (P<0.05). The proportions of smokers, poorly differentiated tumors, TNM stage Ⅲ, tumor size, and lncRNA UCA1 in the death group were higher than those in the survival group (all P<0.05); the levels of lncRNA-GAS5 and miR-29a-3p in the death group were lower than those in the survival group (both P<0.05). Smoking (OR=3.117, 95%CI 1.066-9.121), degree of differentiation (OR=3.337, 95%CI 1.140-9.762), TNM staging (OR=4.899, 95%CI 1.674-14.332), tumor size (OR=4.023, 95%CI 1.375-11.769), lncRNA UCA1 (OR=3.600, 95%CI 1.231-10.533), lncRNA-GAS5 (OR=0.242, 95%CI 0.083-0.708), and miR-29a-3p (OR=0.201, 95%CI 0.069-0.589) were the factors influencing the patients' death (all P<0.05). The sensitivities of lncRNA-GAS5, lncRNA UCA1, miR-29a-3p, and their combination in predicting the patients' death were 0.713, 0.804, 0.706, and 0.883, respectively; the specificities were 0.772, 0.781, 0.687, and 0.901, respectively; the areas under the curves were 0.728, 0.783, 0.739, and 0.886, respectively. The survival curve comparison between the different lncRNA-GAS5 expression groups, between the different lncRNA UCA1 expression groups, and between different miR-29a-3p expression groups showed statisticall differences (all P<0.05). Conclusion The increased expression of lncRNA UCA1 and the decreased expression of lncRNA-GAS5 and miR-29a-3p are related to the prognosis of patients with primary lung cancer.