Controlled compaction and decompaction of DNA by zwitterionic surfactants, alkyldimethylamine oxides (C n DMAO, n = 10, 12, and 14), were investigated by various analytical tools. It was found that DNA could effectively be compacted by cationic micelles of C n DMAOH + which were produced by the protonation of C n DMAO in acidic media leading to the formation of water-insoluble C n DMAOH + /DNA complexes. The DNA molecules were compacted at pH 4-5 when the concentration of C 10 DMAOH + , C 12 DMAOH + , and C 14 DMAOH + reached 8.0, 1.6, and 0.9 mmol•L-1 , respectively. Interestingly, the precipitates of C n DMAOH + /DNA complexes can re-dissolve which indicated that the DNA molecules were released from the complexes by regulating the pH of the solution to ~4 and increasing the surfactant concentration to 40, 9.0, and 1.8 mmol•L-1 for C 10 DMAOH + , C 12 DMAOH + , and C 14 DMAOH + , respectively. This phenomenon was attributed to the hydrogen bonding formed between cationic C n DMAOH + and zwitterionic C n DMAO species. These hydrogen-bonded species screen the electrostatic forces between the positively charged C n DMAOH + micelles and the negatively charged backbones of DNA. Our results demonstrated that the release of DNA from the C n DMAOH + /DNA precipitates depended on the concentration of cationic C n DMAOH + and the pH of the solution. Compared with the conventional release of DNA by the addition of β-cyclodextrin, the present strategy allowed for a specific controlled release, which favored the penetration of DNA into cells and could protect the DNA from nucleases degradation.