Quantitative analysis of trace levels of heavy metals in human cells is critical to environmental and toxicological research. We describe here a new strategy of determining ultratrace levels of cadmium, lead, and mercury in cultured cells. It involves the integration of cell sample introduction and magnetic nanoparticle solid phase microextraction (MSPME) on a microfluidic chip, combined with electrothermal vaporization-inductively coupled plasma mass spectrometry (ETV-ICP-MS) detection. γ-mercaptopropyltrimethoxysilane (γ-MPTS) modified silica-coated magnetic nanoparticles were synthesized and demonstrated for the microextraction of Cd, Pb, and Hg. Under an external magnetic field, these magnetic nanoparticles self-assembled in microchannels to form a solid phase packed column. The formation mechanism of the on-chip magnetic solid phase packed column and the main factors influencing the packing and analytical performance were investigated. Under the optimized conditions, MSPME enabled enrichment of Cd, Hg, and Pb by a factor of >40, and resulted in improved limits of detection for Cd (0.72 ng L−1), Hg (0.86 ng L−1), and Pb (1.12 ng L−1) using ETV-ICP-MS. Quantitative analyses of trace Cd, Hg and Pb in HepG2 cells were achieved by applying the microfluidic system that integrated cell rupture, mixing, magnetic extraction and elution into one device, followed by ultrasensitive detection by ETV-ICP-MS, which required only a microlitre amount of sample. Analysis of approximately 5000 cells revealed that the average amounts of Cd, Hg and Pb in a single HepG2 cell were of the order of a few femtograms, and that the cellular levels increased with increasing concentrations of these metals in cell cultures. The concentrations of Cd, Hg, and Pb detectable in HepG2 cells were several orders of magnitude lower than their IC50 values, suggesting that the technique is potentially useful for measuring these heavy metals in studies of chronic metal toxicity.