Herein, we developed a unique screen-printed carbon electrode (SPCE) with three-dimensional melamine-doped graphene oxide/MXene composite aerogel (3D MGMA) modification, which is used for the simultaneous and sensitive detection of three metal ions (Zn2+, Cd2+, and Pb2+) in the environment. A self-assembly method was used to fabricate 3D MXene aerogels based on MXene, graphene oxide (GO), and melamine. Notably, the network-like 3D structure combining 2D MXene and rGO sheets can provide a high ratio of surface area and enriched functional clusters, which are beneficial for improving the electrical conductivity and promoting the uptake of heavy metal ions. In the linear range of 3–900 μg L-1, the constructed innovative sensing platform can sensitively detect Zn2+, Cd2+, and Pb2+ simultaneously, with detection limits of 0.48 μg L-1,0.45 μg L-1 and 0.29 μg L-1 respectively. This work reflects precision and reliability in the detection of three water samples (tap water, Minzhu lake and Yangtze River) and four cereal samples (sorghum, rice, wheat and corn), proposing a novel strategy for monitoring heavy metal ions in the natural environment.