A novel diazaperinone 12H-pyrazino[2′,3′:3,4]pyrrolo[1,2-a] perimidin-12-one has been successfully synthesized through a one-step condensation. Single crystal X-ray analysis shows that the product is of planar structure with strong π⋯π interactions and H-bonding. Interestingly, the 12H-pyrazino[2′,3′:3,4]pyrrolo[1,2-a]perimidin- 12-one can recognize three different metal cations Cu 2+, Ag + and Hg 2+ via naked eye visualization, and shows turn-on fluorescence for Fe 3+ and Ag + among the 22 metal cations. © 2012 Elsevier Ltd. All rights reserved.