Electrochemical aptasensors generally include three elements, that is, recognition element, signal-transformation element, and regeneration element. In this study, a new adenosine triphosphate (ATP) aptasensor is developed by combining three elements into one DNA oligonucleotide chain. In the DNA oligonucleotide chain, DNA aptamer is used as the recognition element, ferrocene group attached at the 3'-end of the aptamer is used as the signal-transformation element, and azobenzene moiety embedded into the DNA chain is used as the regeneration element. In addition to the similar analytical properties with the traditional ones, the aptasensor developed here is easily regenerated with UV-light irradiation. The current response recorded on the aptasensor increases with increasing the concentration of ATP in the incubation solution and is linear with the logarithm of ATP concentration in the range from 1 nM to 100 μM. The limit of detection is 0.5 nM (S/N = 3). The basal level of ATP in the rat brain cortex microdialysate is determined to be 21.33 ± 4.1 nM ( n = 3). After being challenged with ATP, the aptasensor could be readily regenerated by UV-light irradiation for more than seven cycles. The regeneration of the aptasensor is proposed to be regulated by conversing azobenzene from its trans to cis form under UV irradiation.