The issue of developing a stable self-learning optimal fuzzy control system is discussed in this paper. Three chief objectives are accomplished: 1) To develop a self-learning fuzzy controller based on genetic algorithms. In the proposed methodology, the concept of a fuzzy sliding mode is introduced to specify the system response, to simplify the fuzzy rules and to shorten the chromosome length. The speed of fuzzy inference and genetic evolution of the proposed strategy, consequently, is higher than that of the conventional fuzzy logic control. 2) To guarantee the stability of the learning control system. A hitting controller is designed to achieve this requirement. It works as an auxiliary controller and supports the self-learning fuzzy controller in the following manner. When the learning controller works well enough to allow the system state to lie inside a pre-defined boundary layer, the hitting controller is disabled. On the other hand, if the system tends to diverge, the hitting controller is turned on to pull the state back. The system is therefore stable in the sense that the state is bounded by the boundary layer. 3) To explore a fuzzy rule-base that can minimize a standard quadratic cost function. Based on the fuzzy sliding regime, the problem of minimizing the quadratic cost function can be transformed into that of deriving an optimal sliding surface. Consequently, the proposed learning scheme is directly applied to extract the optimal fuzzy rulebase. That is, the faster the hitting time a controller has and the shorter the distance from the sliding surface the higher fitness it possesses. The superiority of the proposed approach is verified through simulations.