Contamination of groundwater with radioactive substances comprising actinides and lanthanides is a significant environmental hazard and thus the development of selective, sensitive, and easy-to-apply sensors for water-soluble actinide and lanthanide ions is highly sought. We constructed a new selective fluorescent sensor for UO22+, Sm3+, and Eu3+ based on a carbon dot (C-dot)-aerogel hybrid prepared through in situ carbonization of 2-thenoyltrifluoroacetone (TTA), a high-affinity heavy metal chelator. The TTA-C-dot-aerogel enabled the detection of UO22+ ions, which induced a significant red fluorescence shift, whereas Eu3+ and particularly Sm3+ ions gave rise to pronounced fluorescence quenching. Importantly, the lanthanide/actinide ion-selective TTA-C-dots could be synthesized only in situ inside the aerogel pores, indicating the crucial role of the aerogel host matrix both in enabling the formation of the C-dots and in promoting the adsorption and interactions of the lanthanide and actinide metal ions with the embedded C-dots. © 2017 American Chemical Society.