Liquid biopsy has provided an efficient way for detection of gene alterations in advanced non‐small‐cell lung cancer (NSCLC). However, the correlation between systematic determination of somatic genomic alterations in liquid biopsy and tumor biopsy still remained unclear, and the concordance rate between cell‐free DNA (cfDNA) and matched tumor tissue DNA needs to be increased. A prospective study was performed to detect differences in genetic profiles of cfDNA in sputum, plasma, urine, and tumor tissue from 50 advanced NSCLC patients in parallel by the same next‐generation sequencing (NGS) platform. Driver genes alterations were identified in cfDNA sample and matched tumor sample, with an overall concordance rate of 86% in plasma cfDNA, 74% in sputum cfDNA, 70% in urine cfDNA, and 90% in cfDNA of combination of plasma, sputum, and urine. And the concordant rate of cfDNA in sputum in patients with smoking history was higher than that in patients without history of smoking (89% vs. 66%, P = 0.033) and equal to that in plasma cfDNA of the smoking patients (89% vs. 89%). In conclusion, sputum cfDNA can be considered as an alternative medium to liquid biopsy, while the complementarity of genomic profiles in cfDNA among plasma, sputum, and urine was beneficial to detect more diver genes alterations and improve the utility of liquid biopsy in advanced NSCLC (Liquid Biopsy for Detection of Driver Mutation in NSCLC; NCT02778854).