The SARS-CoV-2 main protease (Mpro) is an essential enzyme that promotes viral transcription and replication. Mpro conserved nature in different variants and its nonoverlapping nature with human proteases make it an attractive target for therapeutic intervention against SARS-CoV-2. In this work, the interaction mechanism between Mpro and diindolylmethane derivatives was investigated by molecular docking, enzymatic inhibition assay, UV-vis, fluorescence spectroscopy, and circular dichroism spectroscopy. Results of IC50 values show that 1p (9.87 μM) was the strongest inhibitor for Mpro in this work, which significantly inhibited the activity of Mpro. The binding constant (4.07 × 105 Lmol-1), the quenching constant (5.41 × 105 Lmol-1), and thermodynamic parameters indicated that the quenching mode of 1p was static quenching, and the main driving forces between 1p and Mpro are hydrogen bond and van der Waals force. The influence of molecular structure on the binding is investigated. Chlorine atoms and methoxy groups are favorable for the diindolylmethane derivative inhibitors of Mpro. This work confirms the changes in the microenvironment of Mpro by 1p, and provides clues for the design of potential inhibitors.