The present study investigated the rates of detection and the positive rates of computed tomography (CT)-guided aspiration of lung biopsy for epidermal growth factor receptor (EGFR) gene and anaplastic lymphoma kinase (ALK) gene, and analyzed the relationship between gene mutation and clinical characteristics to improve the rate of related factors of gene detection. The clinical data and CT-guided aspiration biopsy specimen of 250 patients with lung cancer. Data showed that the rate of EGFR gene mutation was 41.2% (103/250) in biopsy specimens of non-small cell lung cancer patients. The rate of EGFR gene mutation of adenocarcinoma (56.6%, P<0.01) was higher than other types of lung cancer. ALK gene mutation of patients in phase IV was obviously higher than that of patients not in phase IV (18.5 and 1.8%, P<0.01). The rate of EGFR gene detection was 83.2% (208/250). The rate of detection of tumor cells >50 was higher. The rate of ALK protein immunohistochemical detection was 87.2%, and the rate of coarse needle biopsy detection was higher than that of the fine needle (91 and 72%, P<0.01), but the positive rate between coarse needle biopsy and fine needle biopsy had no difference (P>0.05). The rate of detection was associated with tumor cell number (P<0.05), and had no correlation with the proportion of tumor cells (P>0.05). The rate of detection of EGFR and ALK genes was associated with tumor cell number and had no correlation with the proportion of tumor cells. The rate of detection is higher when the number of tumor cells is more than 50.