Xylene molecules are a class of volatile organic compounds (VOCs) in the air that are harmful to human health. It is difficult to selectively capture xylenes from the air using existing porous sorbents, due to unspecific and insufficient sorbent/sorbate interactions. We herein report a series of covalent-triazine frameworks (CTFs) that enable selectively capturing of xylene compounds with high adsorption capacities at low pressure. The best-performing CTF material (CTF-2-400), which is comprised of biphenyl and triazine motifs, can adsorb a remarkable amount of o-xylene (358 mg g−1), m-xylene (392 mg g−1) and p-xylene (523 mg g−1) at 25 °C, outperforming most of emerging porous adsorbents. Its ability to capture low-concentration xylenes from the air has been demonstrated using a column breakthrough measurement. The column packed with CTF-2-400 (1 g) continuously captured xylene from the flowing air (~1300 ppm; 10 mL min−1) for 192 h; by contrast, the commercial activated carbon lost its xylene capture capability after only 35 h under the same conditions. We find that the xylene adsorption capacities of the evaluated CTF adsorbents are unrelated to their pore widths or surface areas, and infer that the multiple C-H…π interactions between the CTF framework and xylene molecules account for the observed excellent xylene capture performance.