In the field of analytical chemistry, sample preparation and chromatographic separation are two core procedures. The means by which to improve the sensitivity, selectivity and detection limit of a method have become a topic of great interest. Recently, porous organic frameworks, such as metal-organic frameworks (MOFs) and covalent organic frameworks (COFs), have been widely used in this research area because of their special features, and different methods have been developed. This review summarizes the applications of MOFs and COFs in sample preparation and chromatographic stationary phases. The MOF- or COF-based solid-phase extraction (SPE), solid-phase microextraction (SPME), gas chromatography (GC), high-performance liquid chromatography (HPLC) and capillary electrochromatography (CEC) methods are described. The excellent properties of MOFs and COFs have resulted in intense interest in exploring their performance and mechanisms for sample preparation and chromatographic separation.