Recent N-body simulations show that the formation of a present-day, galaxy-sized dark matter halo in the cold dark matter (CDM) cosmogony in general consists of an early fast-collapse phase, during which the potential associated with a halo is established, followed by a slow-accretion phase, during which mass is added gently in the outer region. In this paper, we consider the implication of such a halo assemble history for galaxy formation. We outline a scenario in which the fast-collapse phase is accompanied by the rapid formation of cold clouds and by starbursts that can eject a large amount of gas from the halo centre. The loss of orbital energy of the cold clouds to the dark matter and the ejection of gas from the halo centre by starbursts can significantly reduce the halo concentration. The outflow from the starburst can also heat the gas in the protogalaxy region. Subsequent formation of galaxies in the slow-accretion regime is therefore in haloes that have been pre-processed by these processes and may have properties different from that given by N-body simulations. This scenario can help to solve several outstanding problems in the standard ΛCDM model of galaxy formation without compromising its success in allowing structure formation at high redshift. The predicted rotation curves can be significantly flatter than those based on the halo profiles obtained from N-body simulations, alleviating the discrepancy of the Tully–Fisher relation predicted in the standard ΛCDM model with observations. The flattened galaxy haloes allow accreted minihaloes to survive in their central regions for longer, a fact that may be helpful in producing the flux anomalies observed in some gravitational lensing systems. The preheating by the early starbursts effectively reduces the amount of gas that can be accreted into galaxy haloes, which may explain why the baryon fraction in a spiral galaxy is in general much lower than the universal baryon fraction, fB∼ 0.16, in the standard ΛCDM model.