The invention belongs to the photoelectronic technical field, and discloses an M-Z electrooptical modulator provided with tunable gratings and based on graphene-molybdenum disulfide heterojunctions. The M-Z electrooptical modulator comprises a substrate layer, the in-out tunable gratings, in-out straight-light waveguides, S-type bent Y-branch waveguides and a two-arm straight light waveguide, wherein the in-out tunable gratings, the in-out straight-light waveguides, the S-type bent Y-branch waveguides and the two-arm straight light waveguide are fully embedded in the substrate layer and successively connected with each other, and the two-arm straight light waveguide is successively provided with a second graphene layer, molybdenum disulfide and a first graphene layer from the bottom up; the second graphene layer is connected to a second electrode mounted between the two arms, and each in-out tunable grating is successively provided with a fourth graphene layer, a boron nitride isolation layer and a third graphene layer while the third and the fourth graphene layers are connected to the a fourth electrode and a fifth electrode respectively. Compared with the prior art, the M-Z electrooptical modulator has the advantages of being small in size, easy to integrate, deep in modulation, high in extinction ratio, big in temperature tolerance and the like.