A novel electrochemical aptasensor based on bimetallic zirconium and copper oxides embedded within mesoporous carbon (denoted as ZrO2CuOx@mC) was constructed to detect miRNA. The porous ZrO2CuOx@mC was created through the pyrolysis of bimetallic zirconium/copper-based metal–organic framework (ZrCu-MOF). The substantial surface area and high porosity of ZrO2CuOx@mC nanocomposite along with its robust affinity toward aptamer strands, facilitated the effective anchoring of aptamer strands on the ZrO2CuOx@mC-modified electrode surface. This, coupled with the remarkable electrochemical performance arising from the presence of metal oxides and mesoporous carbon, resulted in the exceptional sensitivity of the ZrO2CuOx@mC-based aptasensor for the detection of miR-21. The prepared aptasensor not only demonstrated a broad detection range from 10 zM to 100 pM, featuring an exceptionally low detection limit of 0.52 zM, but also exhibited notable selectivity against interferences. Moreover, it displayed good stability, reproducibility, and acceptable applicability for miR-21 detection in human serum. The fabricated aptasensor offers a promising platform for ultrasensitive miR-21 detection, with potential applications in accurate and early diagnosis of diseases related to miRNA.