This paper presents a neural network based optimal control approach for the power allocation problem of smart grid. Firstly the optimal control framework which consists of center control layer, area control layer and generator control layer is presented. In order to reduce computation time of optimal control, the neural network optimization method and schematic diagram is proposed. Simulation is implemented in a modified IEEE30-bus power system comprising 6 conventional generators and a wind plant. Simulation results demonstrate that the proposed neural network optimization approach is satisfied the demand of computation time and the optimal power controller can allocate the power into loads reasonably and cope with the fluctuation of the load and renewable energy source’s output power.