The invention belongs to the technical field of biosensors, and relates to a colorimetric biosensor for detecting UDG based on Au@Ag. The invention provides a DNA biosensor for detecting UDG based on a colorimetric technology. The DNA biosensor is high in specificity and sensitivity, low in cost and high in detection speed. The DNA biosensor comprises an S1 chain, an S2 chain, an S3 chain, hairpin probes H1, H2 and H3, endonuclease IV, heme, Mg2+, buffer, Au@Ag and H2O2. According to the method, a stable three-chain structure which is formed at the beginning is used for closing an active conformation of DNAzyme, enzyme digestion activity is generated in the presence of UDG so as to generate trigger, H1 is further opened by the trigger, H2 is further opened by the H1, and H3 is opened by the H2, so that CHA reaction is triggered, and the change of the color of the nano material is realized.