A sensitive and selective electrochemical method for the determination of kanamycin was established first at the surface of a pencil graphite-embedded PTFE cannula electrode according to the analysis mechanism of target-induced spatial configuration of aptamer-complementary strand hybridization. The electrochemical characteristics studies of homemade electrodes were using cyclic voltammetry. The result showed that the PFTE nested pencil graphite electrode with polished and gold deposits has good electrode application potential. The electrochemical analysis method for kanamycin was performed using differential pulse voltammetric techniques. Modification of the homemade electrode surface increased its DPV response of methylene blue in the presence of kanamycin because more analytes affected the aptamer-complementary strand hybridization conformation. Thus, more G-quadruplexes formed to capture methylene blue. The developed electrochemical sensor yielded a positive correlation between the electrochemical signal and the logarithmic concentration of kanamycin with a wide linear range (15.3 nM to 0.24 mM) and a low limit of detection of 10 nM. The developed sensor was assessed by the analysis of kanamycin in wastewater treatment plant effluent samples by spiked recovery method. The analysis results (recoveries range of 97.5–105% and RSD range of 2.1–7.8%, respectively) proved that the method performance was both acceptable and admirable.