With the development of high-brightness electron beams and chirped pulse amplification technology, inverse Compton scattering (ICS) X/ \(\gamma\) -rays are characterized by compactness, quasi-monochromaticity, continuous energy tunability, and high photon energy. The application of ultrafast laser technology has improved the temporal resolution, brightness, and spectral control capabilities of X/ \(\gamma\) -rays. In this study, we present the design and implementation of a laser system for the very compact inverse Compton scattering \(\gamma\) -ray source. The laser system consisted of a photoinjector driving laser system and a scattering laser system. The photoinjector driving laser system produced ultraviolet pulses with pulse energy, pulse width, and repetition rate of 0.58 mJ, 7.2 ps (FWHM), and 10 Hz, respectively, at a central wavelength of 267 nm, which illuminated a photocathode to generate a high-quality electron beam. The ICS laser system produced two alternative ultrashort laser pulses with central wavelengths of 800 nm and 400 nm, which interacted with the electron beam. An intense second-harmonic (SH) laser with 0.5 J pulse energy was achieved experimentally by passing a terawatt Ti:sapphire laser pulse through a 0.59 mm potassium dihydrogen phosphate (KDP) crystal. A uniform SH laser focal intensity distribution was obtained via wavefront correction using a deformable mirror.