Slab geometry is a promising architecture for power scaling of solid-state lasers. By propagating the laser beams along zigzag path in the gain medium, the thermal effects can be well compensated. However, in the non-zigzag direction, the thermal effects are not compensated. Among the overall aberrations in the slab lasers, the major contributors are two low-order aberrations: astigmatism and defocus, which can range up to over 100 microns (peak to valley), leading to detracted beam quality. Another problem with slab lasers is that the output beams are generally in a rectangular aperture with high aspect ratio (normally 1:10), where square beams are favorable for many applications. In order to solve these problems, we propose an automatic low-order aberration compensation system. This system is composed of three lenses fixed on a motorized rail, one is a spherical lens and the others are cylindrical lenses. Astigmatism and defocus can be compensated by merely adjusting the distances between the lenses. Two wave-front sensors are employed in this compensation system, one is used for detecting the initial parameters of the beams, and the other one is used for detecting the remaining aberrations after correction. The adjustments of the three lenses are directly calculated based on beam parameters using ray tracing method. The initial size of the beam is 3.2mm by 26mm, and peak to valley(PV) value of the wave-front is 33.07λ(λ=1064nm). After correction, the dimension becomes 40mm by 40mm, and peak to valley (PV) value of the wave-front is less than 2 microns.