The excitation-emission matrix (EEM) is a three-dimensional scan that investigates the fluorescence intensities at each excitation and emission wavelength combination to provide valuable information. During EEM, it is important to eliminate the effects of ambient light in real environments because it can interfere with the EEM measurements. The conventional method subtracts reflected ambient light intensities from the EEM signals. However, this method removes time-invariant components but not time-varying components. To solve this problem, we propose a novel dynamic lighting using the spread spectrum technique. In the proposed method, multiple wavelengths are modulated according to different orthogonal codes and simultaneously irradiated. The fluorescence intensities are then detected and, subsequently, the EEM is reconstructed based on the orthogonal codes. This proposed method allows us to not only eliminate the time-invariant components but also average the fluorescence intensities to suppress the time-varying components. We performed EEM measurements using a sample of nicotinamide adenine dinucleotide + hydrogen (NADH) irradiated with ambient light with a maximum illuminance of 1000 lx. We measured EEM using both our proposed method and the conventional method. We further calculated the correlation coefficient between the EEM under each ambient light intensity and the EEM measured by the conventional method under the condition of no ambient light as a reference. The results showed that the correlation coefficient of the proposed method was higher than that of the conventional method. Therefore, the proposed method is more effective than the conventional method at suppressing the ambient light effect.