The aim of the study is to investigate the features of synchronization in ensembles of nonidentical neuron-like FitzHugh–Nagumo oscillators interacting via memristor-based coupling. Methods. The collective dynamics in a ring of FitzHugh–Nagumo oscillators connected via memristive coupling was studied numerically and experimentally. The nonidentity of oscillators was achieved by detuning them by the threshold parameter responsible for the excitation of oscillator, or by detuning them by the parameter characterizing the ratio of time scales, the value of which determines the natural frequency of oscillator. We investigated the synchronization of memristively coupled FitzHugh–Nagumo oscillators as a function of the magnitude of the coupling coefficient, the initial conditions of all variables, and the number of oscillators in the ensemble. As a measure of synchronization, we used a coefficient characterizing the closeness of oscillator trajectories. Results. It is shown that with memristive coupling of FitzHugh–Nagumo oscillators, their synchronization depends not only on the magnitude of the coupling coefficient, but also on the initial states of both the oscillators themselves and the variables responsible for the memristive coupling. We compared the synchronization features of nonidentical FitzHugh–Nagumo oscillators with memristive and diffusive couplings. It is shown that, in contrast to the case of diffusive coupling of oscillators, in the case of meristive coupling, with increasing coupling strength of the oscillators, the destruction of the regime of completely synchronous in-phase oscillations can be observed, instead of which a regime of out-of-phase oscillations appears. Conclusion. The obtained results can be used when solving the problems of synchronization control in ensembles of neuronlike oscillators, in particular, for achieving or destroying the regime of in-phase synchronization of oscillations in an ensemble of coupled oscillators.