Genetic algorithm based optimization of a linear quadratic regulator (LQR) controller which is designed for position and sway control of an overhead crane is presented in this study. Equations of motion of two degrees of freedom (DOF) crane system are derived by using Lagrange formulation and presented as state-space model. A LQR controller is designed by using trial and error method for position control and swing suppression of the crane system. Then, parameters of the LQR controller are optimized by genetic algorithm in order to obtain the best control results. Simulation studies are carried out on a nonlinear crane model which is created in MATLAB/Simulink environment. Performance of the designed controller is evaluated through the simulation results and compared with a pre-designed classical PID controller.