Nanolabels can enhance the detection performance of electrochemical biosensing methods, yet their practical application is hindered by complex preparation, batch-to-batch variability, and poor long-term storage stability. Herein, we present a novel electrochemical method for miRNA detection based on the just-in-time generation of zeolitic imidazolate framework-8 (ZIF-8) nanolabels initiated by nucleic acids. In this design, the target miRNA-21 is captured with magnetic beads and polyadenylated by Escherichia coli Poly(A) polymerase (EPP), producing miRNA-21 molecules with poly(A) tails (miR-21-poly(A)). These molecules are then adsorbed onto a bare gold electrode (AuE) surface via adenine-gold affinity interactions, serving as nucleation sites for the rapid in situ formation of ZIF-8 nanoparticles. The ZIF-8 nanoparticles function as signal labels, impeding electron transfer at the electrode interfaces and thereby generating a notable electrochemical signal. The developed method demonstrated exceptional sensitivity, with a detection limit (LOD) as low as 2.3 aM and a linear detection range from 10 aM to 1000 fM. The practical application of the developed method was validated by using it to evaluate miRNA-21 expression levels in various biological samples, including cell lines, tumor tissues, and clinical blood samples from non-small cell lung cancer (NSCLC) patients. This approach simplifies the detection process by eliminating the need for presynthesized nanomaterials and premodified electrodes. Its simplicity and high sensitivity make this method a promising tool for point-of-care testing and a wide range of biomedical research applications.