The invention provides a method for analyzing nicotine and cotinine in urine, which includes the following steps: 1) Take a standard solution of nicotine and cotinine containing an internal standard, inject it into an enrichment device and carry out the process under auxiliary gas purging Adsorption enrichment, after thermal desorption under carrier gas purging, a standard sample containing an internal standard is obtained; 2) Take a urine sample, and use the same steps as step 1) to obtain a sample to be tested; 3) Separately The standard sample and the test sample containing the internal standard substance enter the GC-MS under the purging of the carrier gas for detection, compare the retention time according to the obtained mass spectrum for qualitative determination, determine the nicotine and cotinine components in the test sample, and The content of nicotine and cotinine in the sample to be tested is calculated by internal standard method. The method for analyzing nicotine and cotinine in urine provided by the invention is convenient, efficient, fast, high in sensitivity and good in repeatability, and can fully meet the analysis requirements of nicotine and cotinine in urine.