Network pharmacology and molecular docking help us predict potential compounds, targets, and pathways of mSMG against IR in T2DM and further guide experimental validation in vitro and in vivo, which conclude that mSMG and its representative compound berberine alleviate hepatic IR and promote glycogen synthesis, and its mechanism may involve the inhibition of TNF-α/JNK1/IRS-2 pathway. This evidence concerns the gene TNF and type 2 diabetes mellitus.