DNA detection via nanopore-based electrochemical biosensors is a promising approach for rapid pathogen identification and disease diagnosis. These sensors detect electrical current variations caused by DNA hybridization in a nanoporous layer on an electrode. Current fabrication techniques for the typically micrometers-thick nanoporous layer often suffer from insufficient control over nanopore dimensions and involve complex fabrication steps, including handling and stacking of a brittle porous membrane. Here, we introduce a bottom-up fabrication process based on the self-assembly of high molecular weight block copolymers with sol-gel precursors to create an inorganic nanoporous thin film directly on electrode surfaces. This approach obviates the need for manipulating the nanoporous membrane, provides fine control over the structural features, and enables surface modification with DNA capture probes. Using this nanoarchitecture with a thickness of 150 nm, we detected DNA sequences derived from 16S rRNA gene fragments of the E. coli genome electrochemically in less than 20 minutes, with a limit of detection of 30 femtomolar (fM) and a limit of quantification of 500 fM. This development represents a major leap towards a portable, rapid, and accurate DNA detection system