This paper investigates the design of discounted-cost linear quadratic regulator for a class of switched linear systems. The distinguishing feature of the proposed method is that the designed discounted-cost linear quadratic regulator achieves not only the desired optimisation index but also the exponentially convergent of the state trajectory of the closed-loop switched linear systems. First, the studied problem is transformed into a quadratic-programming problem by embedding transformation. Then, the bang-bang type solution of the embedded optimal control problem on a finite-time horizon is derived, which is the optimal solution to the original problems. The computable sufficient conditions on discounted-cost linear quadratic regulator are proposed for finite-time and infinite-time horizon cases, respectively. Finally, two examples are provided to demonstrate the effectiveness of the proposed method.