Anticounterfeiting materials are used to distinguish real banknotes, products, and documents from counterfeits, fakes, or unauthorized replicas. However, conventional anticounterfeiting materials generally exhibit a single anticounterfeiting function, resulting in a low level of security. Herein, a novel anticounterfeiting nanocomposite is demonstrated with numerous prominent security features. The nanocomposite is fabricated by doping upconverting nanoparticles (UCNPs) in a photoresponsive azobenzene‐containing polymer (azopolymer). Because of the cis–trans photoisomerization of the azopolymer, the nanocomposite exhibits photoinduced reversible color changes suitable for anticounterfeiting applications. Additionally, the hard nanocomposite can be converted to a rubber‐like soft solid by light irradiation. Imprinted microstructures are fabricated on the photosoftened nanocomposite, which result in photonic colors. Moreover, polarization‐dependent structures are fabricated on the nanocomposite via photoinduced orientation for encryption. Importantly, UCNPs in the nanocomposite emit visible light upon excitation by near‐infrared light, enabling the observation of various anticounterfeiting structures with high contrast. An advantage of the anticounterfeiting nanocomposite is that the security features can be observed by the naked eye for quick discrimination and can be analyzed using laboratory equipment for higher accuracy. The anticounterfeiting nanocomposite is easily processed on paper, glass, and plastic, which demonstrates its potential anticounterfeiting functions for banknotes, wines, and medicines.