This paper reviews the application of deep eutectic solvents (DESs) in the synthesis of metal-organic frameworks (MOFs) and covalent organic frameworks (COFs) as well as their prospects in the field of solid-phase extraction (SPE). Porous organic frameworks (POFs) have unique properties such as a large specific surface area, high porosity, and easy modification. Thus, these materials are widely applied in the fields of catalysis, adsorption, drug delivery, gas storage, and separation. POFs include MOFs, COFs, conjugated microporous polymers (CMPs), porous aromatic frameworks (PAFs), and covalent triazine frameworks (CTFs). MOFs are constructed from metal ions/clusters and organic ligands through coordination bonds and can be extended in two or three dimensions by repeated coordination with potential voids. COFs are formed from two monomers containing light elements (such as carbon, hydrogen, oxygen, nitrogen, boron, and other elements) via coordination bonds and have large two- or three-dimensional structures. However, conventional POF synthesis methods generally suffer from disadvantages such as long synthesis times, high temperature and pressure requirements, and the use of toxic and hazardous reaction solvents. DES consists of a hydrogen bond acceptor (HBA) and a hydrogen bond donor (HBD) bound by hydrogen-bonding interactions. It is a promising green solvent for material synthesis owing to its low vapor pressure, high stability, and ease of preparation. DES can be used to prepare MOFs and COFs and, in specific cases, acts as a structure-directing agent, which has an important impact on the structure and properties of the resulting frameworks. Using appropriate DES formulations, researchers can modulate the crystal structures, pore sizes, and surface properties of MOFs and COFs, resulting in materials with excellent characteristics. SPE is an analytical technique in which a sample solution is added to an SPE column; the sample solution is forced through the stationary phase, and the target compounds are collected for analysis by elution with an organic solvent. Therefore, suitable stationary-phase materials are critical for SPE. Owing to their large specific surface areas and abundant active sites, MOFs and COFs exhibit outstanding adsorption capacity and selectivity in SPE and can effectively enrich target analytes from complex samples. DES-based MOFs and COFs have shown potential use in a wide range of applications, such as in environmental analysis, food testing, and biological sample analysis. Although DES-based MOFs and COFs for SPE are still in the early stages of development, their properties such as efficient enrichment and high selectivity offer good prospects for practical applications. Future research should continue to explore DES-based synthesis methods in depth to prepare other MOFs and COFs with the desired properties and investigate their potential applications in various fields. These efforts are expected to apply these novel materials in commercialized solid-phase extraction methods, bringing new development opportunities in the field of analytical chemistry.