The functions of scanning near-field optical microscopy (SNOM) were installed in high-resolution transmission electron microscopy (TEM) for cathodoluminescence spectroscopy and photoluminescence spectroscopy of individual nanostructures. Optical fiber probes used in SNOM were allowed to approach nanoparticles by piezomanipulation with simultaneous observation by TEM. As an application of this method, cathodoluminescence and photoluminescence from zinc oxide nanoparticles were measured at room temperature and 130 K. It was demonstrated that the present method directly provides the relationships between structural features of individual nanoparticles and spectra.