A general strategy for tailoring upconversion luminescence in lanthanide-doped inorganic nanocrystals through local structure engineering.