The invention discloses an all-fiber electro-optical modulator based on graphene materials and a method of the all-fiber electro-optical modulator. The all-fiber electro-optical modulator based on the graphene materials comprises a single mode fiber, a silicon dioxide groove-type substrate, an Al2O3 transition thin layer and a graphene membrane, wherein the single mode fiber is arranged on the silicon dioxide groove-type substrate and fixed through sealed epoxy glue, a groove is formed in the single mode fiber, the Al2O3 transition thin layer is arranged in the groove, and the graphene membrane is arranged on the Al2O3 transition thin layer. Conductivity performance of graphene is changed through change of voltage applied on a metal electrode, therefore an imaginary part or a real part of an effective refractive index of a graphene composite layer structure is changed, and an electric absorption strength modulator or a phase modulator is achieved. The all-fiber electro-optical modulator based on the graphene materials and the method of the all-fiber electro-optical modulator can achieve design of the all-fiber electro-optical modulator, and have the advantages of being tiny in size, little in power consumption, low in insertion loss, high in modulating speed, beneficial for optical integration and the like. In addition, due to the fact that additional optoelectronic devices are not introduced, the all-fiber electro-optical modulator based on the graphene materials and the method of the all-fiber electro-optical modulator are suitable for being used in an all-fiber communication system and a dense wavelength division multiplexing (DWDM) system.