Four pyrene functionalized triazolium salts with different lengths of alkyl tail from C4 to C16, i.e., PYTAZ-C4, PYTAZ-C8, PYTAZ-C12 and PYTAZ-C16, have been designed and synthesized for ATP recognition. It was revealed that the longer alkyl tail anchored receptors PYTAZ-C12 and PYTAZ-C16 exhibit low CMC values, and self-assemble nanoaggregation at low concentration in aqueous solution, which show a pyrene-based excimer emission at 496 nm. However, the shorter alkyl anchored receptors PYTAZ-C4 and PYTAZ-C8 give only the pyrene-based monomer emission at 380 nm at the test concentration of 10 μM in aqueous solution. Importantly, PYTAZ-C12 and PYTAZ-C16 exhibit a good fluorescence turn-on response toward polyphosphate anions, especially ATP, with the detection limits of 2.5 μM and 0.77 μM, respectively. Furthermore, probe PYTAZ-C16 was successfully used for fluorescence imaging of intracellular ATP in living cells.