Atomically precise silver nanoclusters (AgNCs) are small nanostructures consisting of only a few atoms of silver. The combination of AgNCs with cytosine-rich single-stranded oligonucleotides results in DNA-templated silver nanoclusters (DNA-AgNCs). DNA-AgNCs are highly luminescent and can be engineered with reproducible and unique fluorescent properties. Furthermore, using nucleic acids as templates for the synthesis of AgNCs provides additional practical benefits by expanding optical activity beyond the visible spectral range and creating the possibility for color tunability. In this study, we explore DNA oligonucleotides designed to fold into hairpin-loop (HL) structures which modulate optical properties of AgNCs based on the size of the loop containing different number of cytosines (HL-CN). Depending on the size of the loop, AgNCs can be manufactured to have either single or multiple emissive states. Such hairpin-loop structures provide an additional stability for AgNCs and further control over the base composition of the loop, allowing for the rational design of AgNCs’ optical properties. We demonstrate the potential of AgNCs in detecting Hg2+ by utilizing the HL-C13 design and its variants HL-T2C11, HL-T4C9, and HL-T6C7. The replacement of cytosines with thymines in the loop was intended to serve as an additional sink for mercury ions extending the detectable range of Hg2+. While AgNC@HL-T0C13 exhibits an interpretable quenching curve, AgNC@HL-T6C7 provides the largest detectable range of Hg2+. The results presented herein suggest that it is possible to use a rational design of DNA-AgNCs based on the composition of loop sequence in HL structures for creating biosensors to detect heavy metals, particularly Hg2+.