Optical spectroscopic techniques (e.g., extinction, scattering, and fluorescence spectroscopies) are important for the analysis of colloidal solutions of nanoparticles (NPs). They are routinely applied to plasmonic and quantum-dot NP samples assuming that these contain a single population of particles with modest size and shape dispersity. However, these spectroscopic techniques become less effective when the sample is a mixture of particles with different sizes, shapes, or composition. Here, an original microfluidic method is proposed for the optical spectroscopic analysis of colloidal NP solutions that combines periodic trapping of NPs by dielectrophoresis (DEP) with in situ optical extinction spectroscopy. The periodic trapping leads to modulation of the continuously monitored optical spectrum depending on the DEP properties of the NPs. DEP-modulated spectroscopy is demonstrated using colloidal gold NPs as small as 40 nm diameter. It is found that the DEP modulation is significantly enhanced when employing suitable microfluidic flow over a multielectrode array. Finally, it is shown that the method can identify and characterize the NP species simultaneously present in a mixture of 40 and 80 nm gold NPs, opening the way toward optical spectroscopic analysis of higher complexity NP mixtures through the combination of the DEP-modulated spectroscopy with chemometric methods.