Chaos synchronization is the foundation of chaotic optical communications. The parameter mismatch between chaotic transmitter and receiver will significantly degrade the synchronization performance. In this letter, neural network is proposed to improve the performance of chaos synchronization. The compensation for chaos synchronization error caused by the mismatch of different hardware parameters, such as frequency response, loop gain, modulator bias, and time delay, has been discussed and analyzed in simulation and experiment. Compared with other digital signal processing (DSP) algorithms including feed-forward equalization and Volterra filter, neural network shows best performance. In some occasions, the cross correlation can be improved from 0 to 0.8. Further, the performance improvement in chaotic optical communications by neural network has been verified in simulation. This technique has potential to be used in high-speed chaotic optical communications.