A new phosphorescent chemosensor for Hg(2+) and acetonitrile (MeCN) based on iridium(III) complex Ir(dpp)(2)(dtc) (Ir1, dppH = 4,6-diphenylpyrimidine, dtcH = diethyl dithiocarbamic acid) was realized. Upon addition of a tetrahydrofuran (THF) solution of Hg(2+), the dichloromethane (DCM) solution of Ir1 gave a visual color change and significant fluorescent quenching. When MeCN was added, a new fluorescent emission emerged, which constituted a selective MeCN phosphorescent chemosensor. Complex Ir1 has been developed as an AND logic gate with Hg(2+) and MeCN as inputs.