Based on Lyapunov stability theory, optimal control principle and step design methodology, nonlinear feedback controller and optimal controller are designed, in which the nonlinear feedback controller makes the trajectory error between two neuron systems tend to zero, and the optimal controller makes the spent energy meet minimum, which is spent in the process of synchronizing. In this paper, the uncertain cable model is taken as an example to illustrate the full-order optimal synchronization of two neurons. The uncertain cable model and the uncertain Hindmarsh-Rose (HR) model are taken to illustrate the reduced-order optimal synchronization of two neurons. In addition, the unknown parameters are identified successfully. Numerical Simulation results show the effectiveness of the strategy further.