Dipeptides, the prototype peptides, exist in both linear (l-) and cyclo (c-) structures. Since the first mass spectrometry experiments, it has been observed that some l-structures may turn into the cyclo ones, likely via a temperature-induced process. In this work, combining several different experimental techniques (mass spectrometry, infrared and Raman spectroscopy, and thermogravimetric analysis) with tight-binding and ab initio simulations, we provide evidence that, in the case of l-phenylalanyl-l-alanine, an irreversible cyclization mechanism, catalyzed by water and driven by temperature, occurs in the condensed phase. This process can be considered as a very efficient strategy to improve dipeptide stability by turning the comparatively fragile linear structure into the robust and more stable cyclic one. This mechanism may have played a role in prebiotic chemistry and can be further exploited in the preparation of nanomaterials and drugs.