Sample pretreatment is considered the most significant procedure in analyzing and detecting trace targets from complicated matrices. Aerogels display remarkable properties, such as a low density, porous structure, high surface area, excellent adsorption performance, and good thermal stability, making the aerogels exploitable as extraction materials for sample preparation. This review summarizes the classification, development, and application of aerogels for solid-phase extraction (SPE) and solid-phase microextraction (SPME) from 2010 to 2021. Different aerogel types were introduced in SPE and SPME, such as silica, carbon, organic, organic-inorganic hybridized, and metal-oxide aerogels. The aerogel-based sorbents effectively captured a wide variety of analytes in environmental, biological, and food samples due to their excellent properties and flexible adsorption performance. Current challenges and future prospects for aerogels in sample preparation are also proposed. (C) 2021 Elsevier B.V. All rights reserved.