The success of DNA analytical methods, including long-read sequencing, depends on the availability of high-quality, purified DNA. Previously, we developed a method and device for isolating high-molecular-weight (HMW) DNA for long-read sequencing using a high-salt gel electroelution trap. Here, we present an improved version of this method for purifying nucleic acids with high yield and purity from even the most challenging biological samples. The proposed method is a significant improvement over the previously published procedure, offering a simple, fast, and efficient solution for isolating HMW DNA and smaller DNA and RNA molecules. The method utilizes vertical gel electrophoresis in two nested, partially overlapping electrophoretic columns. The upper, smaller-diameter column has a thin layer of agarose gel at the bottom, which separates nucleic acids from impurities, and an electrophoresis buffer on top. After the target nucleic acid has been gel-purified on the upper column, a larger-diameter column with a layer of high-salt gel overlaid with electrophoresis buffer is inserted from below. The purified nucleic acid is then electroeluted into the buffer-filled gap between the separating gel and the high-salt gel, where excess counterions from the high-salt gel slow its migration and cause it to accumulate. The proposed vertical purification system outperforms the previously described horizontal system in terms of ease of use, speed, scalability, and compatibility with high-throughput workflows. Furthermore, the vertical system allows for the sequential purification of several nucleic acid species from the same sample using interchangeable salt-gel columns.