With the development of nuclear energy and the widespread use of precious metals, the threat to the environment and human health from radioactive iodine isotopes and metal ions has increased. Therefore, the development of efficient adsorbents for pollutants and precious metals is crucial. Herein, a novel nitrogen-rich covalent organic framework (TPDA-DPTA-COF) containing tertiary amines, imine linkages, and pyridine units is designed from N,N,N′,N′-tetrakis(4-aminophenyl)-1,4-benzenediamine (TPDA) and 2,5-di-(pyridin-4-yl)terephthalaldehyde (DPTA). TPDA-DPTA-COF exhibits excellent performance in iodine capture (6.85 g g −1 for I 2 vapor and 2570 mg g −1 for I 2 solution in n-hexane) and gold recovery (3014 mg g −1 Au(III) in HAuCl 4 solution) due to the nanotrap effect arising from nanoporous nitrogen-rich structure. Even in dilute acid leachate from discarded CPUs, TPDA-DPTA-COF exhibits exceptional selective extraction ability toward Au(III). The unique nanotrap structure makes TPDA-DPTA-COF a powerful adsorbent for iodine and Au(III), which paves promising application in nuclear waste treatment and resource recovery.