In this work, a novel molecularly imprinted electrochemical sensor based on the amino-functionalized silica nanoparticles was built for the sensitive and selective detection of 2,4-dichlorophenoxyacetic acid (2,4-D). The hierarchical porous dendrimer-like silica nanoparticles (HPSNs-NH2) were synthesized by an ethyl ether emulsion method. The selective molecularly imprinted polymers (MIP) was prepared on the HPSNs-NH2 modified electrode via electropolymerization by using 2,4-D as the template and o-phenylenediamine (OPD) as the monomer. The porous structure of HPSNs-NH2 reduced the diffusion limitations of the analytes, enhanced the accessibility and increased the surface area of the sensor, while the MIP layer offered the ability to recognize and quantify target 2,4-D by using ferro/ferricyanide as probes. Several significant experimental parameters on the analytical performance of the MIP/HPSNs-NH2 sensor were explored and optimized. Under the optimized condition, the sensor displayed an appreciable selectivity over structurally related compounds and good sensitivity toward 2,4-D. The linear range of 2,4-D detection was from 1.00 × 10−10 to 2.50 × 10−8M and the detection limit was down to 1.17 × 10–11M according to the 3Sa/b criteria. This method has been applied to detect 2,4-D in bean sprout samples with satisfying results.