Sample pretreatment in analytical chemistry is critical, and the selection of materials for sample pretreatment is a key factor for high enrichment ability, good practicality, and satisfactory recoveries. In this review, the recent progress of the sample pretreatment methods based on various nanomaterials (i.e., carbon nanomaterials, porous nanomaterials, and magnetic nanomaterials) with excellent adsorption efficiency, selectivity, and reproducibility, as well as their applications, are presented. Due to the unique nanoscale physical–chemical properties, magnetic nanomaterials have been used for the extraction of target analytes by easy-to-handle magnetic separation under a magnetic field, which can avoid cumbersome centrifugation and filtration steps. This review also highlights the preparation process and reaction mechanism of nanomaterials used in the sample pretreatment methods, which have been applied for the extraction organophosphorus pesticides, fluoroquinolone antibiotics, phenoxy carboxylic acids, tetracycline antibiotics, hazardous metal ions, and rosmarinic acid. In addition, the remaining challenges and future directions for nanomaterials used as sorbents in the sample pretreatment are discussed.