Two-dimensional (2D) layered metal−organic frameworks (LMOFs), an emerging type of 2D materials, have aroused significant attention recently. Although a great number of LMOFs with diverse topologies have been reported, their predictable preparation remains challenging. Inspired by the transformation of three-dimensional pillared-layer MOFs (PLMOFs) to 2D layers via solvent-assisted link exchanging, we developed herein a novel de novo synthesis strategy, i.e., in situ capping, for the rational fabrication of 2D LMOFs. During PLMOF construction, the pillars are in situ substituted by terminal ligands to seal both sides of the instantaneously generated layers, forming the targeted 2D LMOFs. Employing such a strategy, 2D LMOFs {•DMF•H 2 O} n (HSB-W14) were obtained predictably by exchanging the terephthalate pillar (bdc) of HSB-W1 (a 3D PLMOF composed of bdc and 1,2-bis(4′-pyridylmethylamino)-ethane) with the capping ligand benzoate or its analogues. The strategy is also valid for other PLMOF systems with bipyridine-type ligands as pillars, X-pcu-1-Zn, for example. Furthermore, the undersized materials of HSB-W11−W14 have been prepared by the instant in situ exfoliation method. The structure, morphology, and fluorescence were tuned by changing the anchoring terminal ligands. In addition, LMOFs HSB-W11−W14 were utilized as I 2 adsorbents; remarkably, HSB-W13 displayed a record-high volatile iodine uptake at room temperature. The in situ capping strategy has many merits including high designability and efficiency, facile green synthesis, and atom economy, which may be widely adapted to fabricate diverse 2D LMOFs.