We study the validity of Landauer principle in the non-Markovian regime by means of collision models where the intracollisions inside the reservoir cause memory effects generating system-environment correlations. We adopt the system-environment correlations created during the dynamical process to assess the effect of non-Markovianity on the Landauer principle. Exploiting an exact equality for the entropy change of the system, we find the condition for the violation of the Landauer principle, which occurs when the established system-environment correlations become larger than the entropy production of the system. We then generalize the study to the non-equilibrium situation where the system is surrounded by many reservoirs at different temperatures.Our results, verified through collision models with Heisenberg-type interactions, suggest that the complexity of the environment does not play a significant role in the qualitative mechanisms underlying the violation of the Landauer principle under non-Markovian processes.