Covalent organic frameworks (COFs) are crystalline porous polymers with designable structures and properties. Their crystallization typically relies on trial-and-error involving harsh conditions including organic solvents, presenting significant obstacles for rational design and large-scale production. Here, we present a liquid crystal directed synthesis methodology and its implementation for up to gram-scale production of highly crystalline COFs in water and air. It is compatible to monomers with different structures, shape, size, length of side chains, and electron-donating, electron-accepting and heterocyclic substitutions near reactive sites. 17 types of donor-acceptor two-dimensional COFs including 4 types of new ones and a three-dimensional COF with a yield of up to 94% were demonstrated, showing great generality of the method. The as-synthesized donor-acceptor COFs are organic semiconductors and contain macropores besides intrinsic mesopores which make them as attractive catalysts. The production of H2O2 under visible light in water was studied and the structure-property relationships were revealed. The production rate reached 4347 μmol h−1 gcat−1, which is about 467% better than that of the benchmark photocatalyst g-C3N4. This study will inspire the mild synthesis and scale-up of a wide spectrum of COFs and organic semiconductors as efficient catalysts, promote their structure-property investigation, and boost their applications.