This paper investigates the stability analysis and the design of optimal guaranteed cost control law for a class of Takagi-Sugeno (T-S) fuzzy systems. Based on the structure information of the premise rule base, a novel Lyapunov function called piecewise fuzzy Lyapunov function (PFLF) approach is developed by combining the fuzzy Lyapunov function (FLF) approach with the piecewise quadratic Lyapunov function (PQLF) approach. A new parallel distributed compensation (PDC) controller is also presented. Via the PFLF approach presented, the stability analysis and the design way of optimal guaranteed cost control law are derived in the form of linear inequality matrix (LMI). The designed method in this paper inherits the advantage of FLF and PQLF and ensures the resulting system is asymptotically stable while an upper bound of the closed-loop cost function is minimized. Two numerical examples are supplied to demonstrate the effectiveness of the designed control law.