A novel fluorescent sensor, 1,4-bis(2-(quinolin-8-yloxy)acetyl)piperazine (DQS), utilizing an 8-hydroxyquinoline scaffold was designed and synthesized. DQS shows good water solubility, high selectivity and excellent sensitivity for detecting Sn4+ and PO43−. It exhibits a reversible on-off type fluorescence response with alternate addition of tin(IV) and the phosphate anion under aqueous conditions.