Abstract The dynamics of an exciton–polariton Bose–Einstein condensate in an optical microcavity was considered. A novel version of the stochastic Gross–Pitaevskii equation was proposed to describe the condensate evolution under the non-Markovian interaction with the environment. The proposed version was used to analyze the condensate dynamics at various temperatures. The phase transition from the homogeneous to the fragmented state of the condensate near a temperature of 15 K was detected. This phase transition is accompanied by a sharp drop in the condensate density and a decrease in the correlation length. It was found that, at a temperature of 10 K, the correlation length oscillates with time. The results obtained indicated the necessity to take into account the non-Markovianity of the condensate interaction with the excitonic reservoir.