The NIR-IIb (1500–1700 nm) window is ideal for deep-tissue optical imaging in mammals, but lacks bright and biocompatible probes. Here, we developed biocompatible cubic-phase ( α-phase) erbium-based rare-earth nanoparticles (ErNPs) exhibiting bright downconversion luminescence at ~ 1600 nm for dynamic imaging of cancer immune-therapy in mice. We used ErNPs functionalized with cross-linked hydrophilic polymer layers attached to anti-PD-L1 antibody for molecular imaging of PD-L1 in a mouse model of colon cancer and achieved tumor to normal tissue signal ratios of ~ 40. The long luminescence lifetime of ErNPs (~ 4.6 ms) enabled simultaneous imaging of ErNPs and lead sulfide quantum dots (PbS QDs) emitting in the same ~ 1600 nm window. In vivo NIR-IIb molecular imaging of PD-L1 and CD8 revealed cytotoxic T lymphocytes in the tumor microenvironment in response to immunotherapy, and altered CD8 signals in tumor and spleen due to immune activation. The novel crosslinked functionalization layer facilitated 90% ErNPs excretion within two weeks without detectable toxicity in mice.