Chromatic dispersion from optical fiber is the most important problem that produces temporal skews and destroys the rectangular structure of code patterns in the spectra-amplitude-coding optical code-division multiple-access (SAC-OCDMA) system. Thus, the balance detection does not work perfectly and the system performance will be degraded. In order to improve the distortion, we apply cascaded Mach–Zehnder interferometers (MZIs) to design a dispersion slope equalizer for the SAC-OCDMA system integrated with arrayed-waveguide grating (AWG) router coder. The dispersion slopes of a cascaded MZI compensator could be adjusted by the arm length differences of MZIs and be complementary with the fiber links. In this study, we present a set of length differences for 10 km long single-mode fiber (SMF) and verify the compensation scheme by relative delay time slope and signal-to-interference ratio (SIR). The dispersion slope equalizer with perfect complementary slope successfully compensates the dispersion from SMF and the system performance with dispersion slope equalizer is highly improved.