The economic load dispatch (ELD) problem contains many equality and inequality constraints that convert the problem to a non-smooth and non-convex problem, which makes difficulty to find absolute minimum point by using classic mathematic methods. In this paper, the presented ELD problem is a non-smooth and non-convex optimization problem which contains linear and nonlinear constraints such as valve point effect, load equality, the constraints of generators, prohibited operational zones, spinning reserve, ramp up rate, ramp down rate and multiple fuel consumption constraints. The problem is solved using glowworm swarm optimization (GSO) method. Due to stochastic nature of GSO, this algorithm does not trap in local optimums and local minimums. In order to prove the effectiveness of this algorithm, the proposed algorithm is simulated for a 10-unit test system with total amount of load of 2700 MW. The simulation results are compared with other common algorithms, and the results prove the effectiveness, accuracy and speed of this algorithm for solving ELD problem.