The present study showcases two Cd-based MOFs that exhibit potential as afterglow probes for the “turn off” and “turn on” detection of Fe3+ ions and NH3, respectively.