Developing novel methods for metal-induced switching of peptide structures expands the design principles of functional biomolecules and biomaterials. Here, a simple method for on-resin synthesis of dipicolylamine (Dpa)-containing peptides was developed. Whereas addition of divalent metal ions such as Fe(II) and Cu(II) to a peptide bearing a pair of Dpa moieties at the i and i + 4 positions led to the formation of a 1:1 complex of Dpa with metals, addition of Ni(II) yielded a cross-linked structure of Dpa–metal (2:1). This feature was utilized for the selective detection of Ni(II) using the peptide–Fe(II) complex. Repeated switching of the helical structure was also achieved by multiple additions of divalent metal ions to the peptide.