Inverted pendulum is inherently unstable and highly nonlinear system and is widely used for experimentation of new control technologies due to its challenging fast and highly nonlinear unstable dynamics. In this paper a nonlinear back stepping based controller is designed using Lyapunov function and parameters of controller are optimized using genetic algorithm. A new function based on Lyapunov theory is used as performance criteria. This new fitness function is based on first derivative of output and ensures that system is stabilized using least energy.Index Terms-inverted pendulum, genetic algorithm, back steeping controller, optimal.