This paper presented a novel microemulsion-based method for the preparation of MgO nanomaterials. Briefly, in a paraffin-in-water microemulsion system, we firstly synthesized Mg5(CO3)4(OH)2·4H2O/paraffin composites, the precursor of MgO, via an interface-controlled homogenous precipitation. By calcinating the composite precursor at different temperatures, MgO nanomaterials with varied morphologies could be obtained. A flower-like 3D hierarchical structure was achieved when applying lower calcination temperatures, which indeed preserves the morphology of the composite precursor. While at higher calcination temperatures, one can get the well-defined MgO nanoparticles. The prepared materials were thoroughly characterized by XRD, SEM and BET methods, and their application as adsorbents to remove Congo red from wastewater was demonstrated.