Aptamers, which are artificial oligonucleotides selected in vitro, have been employed to design novel biosensors (i.e., aptasensors). In this work, we first constructed a label-free electrochemical aptasensor introducing a probe immobilization technique by the use of a layer-by-layer (LBL) self-assembled multilayer with ferrocene-appended poly(ethyleneimine) (Fc-PEI) on an indium tin oxide (ITO) array electrode for detection of cocaine. The Fc-PEI and gold nanoparticles (AuNPs) were LBL assembled on the electrode surface via electrostatic interaction. Then, cocaine aptamer fragments, SH-C2, were covalently labeled onto the outermost AuNP layer. When the target cocaine and cocaine aptamer C1 were present simultaneously, the SH-C2 layer hybridized partly with C1 to bind the cocaine, which led to a decreased differential pulse voltammetry (DPV) signal of Fc-PEI. This DPV signal change could be used to sensitively detect cocaine with the lowest detectable concentration down to 0.1 microM and the detection range up to 38.8 microM, which falls in the the expected range for medical use of detecting drug abuse involving cocaine. Meanwhile, the sensor was specific to cocaine in complex biologic fluids such as human plasma, human saliva, etc. The sensing strategy had general applicability, and the detection of thrombin could also be realized, displayed a low detection limit, and exhibited worthiness to other analytes. The aptasensor based on the array electrode held promising potential for integration of the sensing ability in multianalysis for simultaneous detection.