A novel method was developed for the preconcentration, separation, and determination of trace lead (Pb) and cadmium (Cd) by inductively coupled plasma mass spectrometry (ICPMS), based on carbon nanofibers (CNFs) loaded with 8-Hydroxyquinoline (HOx) as a solid phase extraction adsorbent. The adsorption behaviors of the analytes on CNFs-HOx were investigated. The effects of pH, sample flow rate and volume, elution solution and interfering ions on the preconcentration and separation of the analytes were examined in detail. The adsorption capacity of CNFs-HOx for Pb and Cd was 4.3 mg g(-1) and 5.0 mg g(-1), respectively. Under the optimum conditions, the detection limits of Pb and Cd were 3.0 and 0.7 pg mL(-1) with an enrichment factor of 100-fold, respectively, while the relative standard deviations (RSDs) were less than 5.0% for both elements (c=1.0 ng mL(-1), n=9). This method was applied to the determination of trace Pb and Cd in environmental and biological samples with recoveries of 95-103%. In order to validate this method, a certified reference material of mussel (GBW 08571) was analyzed, and the determined values are in good agreement with the certified values.