An optical filter based on graphene comprises an optical coupling structure. The optical coupling structure comprises an electrolyte layer, a metal electrode, a graphene strip array, a dielectric layer, a metal optical grating and a substrate. The electrolyte layer and the metal electrode are provided with adjusting devices for top gate voltage. A Fabry-Perot microcavity array composed of the graphene strip array, the dielectric layer and the metal optical grating is located on the substrate, and the electrolyte layer and the metal electrode are located on the same plane above the Fabry-Perot microcavity. Based on the micro-nano etching process technology and the multiplayer film technology which are extremely mature at present, the technological process is not complex, and operation is easy. Compared with a traditional filter with the same frequency band, the optical filter has the advantage that the size of a coupled component is greatly reduced due to introduction of graphene. The optical filter frequency is regulated by adjusting the Fermi level of graphene through grid voltage, active control over light is achieved, the needed power consumption is small, the quality factor is large, the response speed is high, and very wide working frequency is achieved.