This paper presents an adaptive particle swarm optimization (APSO) based LQR controller for optimal tuning of state feedback controller gains for a class of under actuated system (Inverted pendulum). Normally, the weights of LQR controller are chosen based on trial and error approach to obtain the optimum controller gains, but it is often cumbersome and tedious to tune the controller gains via trial and error method. To address this problem, an intelligent approach employing adaptive PSO (APSO) for optimum tuning of LQR is proposed. In this approach, an adaptive inertia weight factor (AIWF), which adjusts the inertia weight according to the success rate of the particles, is employed to not only speed up the search process but also to increase the accuracy of the algorithm towards obtaining the optimum controller gain. The performance of the proposed approach is tested on a bench mark inverted pendulum system, and the experimental results of APSO are compared with that of the conventional PSO and GA. Experimental results prove that the proposed algorithm remarkably improves the convergence speed and precision of PSO in obtaining the robust trajectory tracking of inverted pendulum.