We have developed spectrally encoded photoacoustic microscopy using a digital mirror device for multi-wavelength tomography, which enables fast spectral imaging of optical absorption. The optical illumination wavelengths are multiplexed at a laser pulse repetition rate of ~ 2 kHz. Liquid samples, whole blood, and blood vessels in mouse ears were imaged. Compared with internal wavelength tuning of a narrow-band laser, external wavelength tuning based on a digital mirror device improves the data acquisition speed of spectral photoacoustic microscopy. Compared with external wavelength scanning of a wide-band laser with the same pulse energy, spectral encoding improves the signal-to-noise ratio.