Synthesis of two dimensional (2D) materials mainly relies on interface-templates, exfoliation of layered crystals and surfactant-assistance. Here we have realized another strategy of polymerization in a 2D nano-reactor. As an application of this strategy, a 2D nano-reactor was constructed within a new pillar-layer metal organic framework (MOF) and in this nano-reactor a moderately stable 2D phosphorus material was synthesized from white phosphorus (P4). Our research may provide a new approach for the synthesis of various 2D materials.