A novel magnetic nanoporous carbon (Fc-Fe/Ni@MPC) was fabricated from ferrocene contained metal-organic framework (MOF) and employed as multifunctional QuEChERS adsorbent for determination of triazine herbicides in various fruit and vegetable samples before LC-MS/MS. The prepared Fc-Fe/Ni@MPC not only maintained the original ordered morphology from MOF precursor, but also exhibited high graphitization and good superparamagnetism through pyrolysis. This sorbent afforded adsorption capacity of 1163.25 mg/g, 157.83 mg/g, 157.69 mg/g and 25.10 mg/g towards chlorophyll, lycopene, β-carotene and lutein via hydrophobic, π-π and hydrogen bonding interactions. The method gave negligible matrix effects of -14.2 % ∼ 10.8 %, low detection limits of 0.001-0.04 μg/kg and satisfactory recoveries of 80.2 %-112 % in orange, citrus, apple, watermelon, tomato, carrot and lettuce samples, when performing 2 mg of this single sorbent within just 15 s. This work revealed the prospect of Fc-Fe/Ni@MPC as versatile and efficient QuEChERS adsorbent for pretreatment of triazine herbicides in large kinds of pigment-rich food samples.