Dehydroacetic acid analogue (DHA) and 7-(diethylamino)-2-oxo-2H-chromene-3-carbohydrazide (COM) Schiff base ligand (COM-DHA)as dual-mode fluorescence chemosensorwas synthesized and structurally characterised by using elemental analysis, FTIR, NMR, and Mass analysis. The free probe COM-DHA shows distinct fluorescence emission at 476 nm, upon interaction with Ni2+ the emission intensity was quenched and with Th4+ the emission intensity was redshirted to 500 nm. Further, the ratiometric fluorescence change (I500/I476) was used to detect Th4+, and a turn-off fluorescence probe COM-DHA at 476 nm was used to detect Ni2+ ions. The COM-DHA forms a 2:1 stoichiometric complex with both Ni2+/Th4+ ions with an estimated association constant of 4.84 × 104 and 6.68 × 104 M−2 respectively. A further probe COM-DHA is that it has a wide working pH range (5 to 10) with a short response time (2 to 3 min). The detection limit of COM-DHA towards Ni2+ and Th4+ was found to be 77.8and 48.7 nM, respectively. The, DFT/TD-DFT calculations and FTIR analysis were used to study the binding mechanism between COM-DAH and Ni2+/Th4+ ions. Furthermore, the proposed probe COM-DHAhas successfully quantified trace amounts of Ni2+ and Th4+in real samples and applied them to the in-vivo bioimaging of Th4+ in C. elegans model.