The properties and applications of metal-organic frameworks (MOFs) can be tuned by their metal centers and organic ligands. To reveal experimentally and theoretically the influence of metal centers and ligands on electrochemical performance of MOFs, three MOFs with copper or zinc centers and organic ligands of 2-methylimidazole (2MI) or 1,3,5-benzenetricarboxylic acid (H3 BTC) are synthesized and characterized in this study. 2D and porous Cu-2MI exhibits a larger active area, faster electron transfer capability, and stronger adsorption capacity than bulk Cu-BTC and dodecahedron Zn-2MI. Density functional theory calculations of adsorption ability of three MOFs toward xanthine (XA), hypoxanthine (HXA), and malachite green (MG) prove that 2D Cu-2MI has the strongest adsorption energies to three targets. Rotating disk electrode measurements reveal that 2D Cu-2MI features the biggest intrinsic heterogeneous rate constant toward three analytes. On 2D Cu-2MI sensitive and selective monitoring of XA, HXA, and MG is then achieved using differential pulse voltammetry. Their monitoring in real samples on 2D Cu-2MI is accurate and comparable with that using high-performance liquid chromatography. In summary, regulation of electrochemical sensing features of MOFs is realized through defining selected metal centers and organic ligands.