The invention discloses a non-carbon heteroatom-modified porous graphene framework and a preparation method thereof, and belongs to the technical field of novel material preparation. The framework is of a three-dimensional structure formed by assembling graphene slices, a supporting cavity with the size of 50-5000 nm is presented, and 80%-99% of non-carbon heteroatoms are modified on the edges of the graphene slices and holes. The non-carbon heteroatom-modified porous graphene framework is prepared by calcining a ternary solid mixture of a carbon source, a non-carbon heteroatom source and a catalytic graphitization template at high temperature, and in-situ doping is achieved. The framework enriches the varieties of carbon nanomaterials, supplies a hole structure and non-carbon heteroatom-modified graphene material which is controllable in adjustment and has the wide application prospect in the fields of electrochemical energy storage, heterogeneous catalysis, adsorptive separation and the like. Meanwhile, the efficient low-cost graphene preparation method is achieved, the technology is simple and safe, the raw materials are rich and cheap, research and industrialization of the graphene material are effectively promoted, and the high additional value of the cheap raw materials, production of graphene-related energy materials and development of energy industry are promoted.