We use a multimillion particle N‐body + smooth particle hydrodynamics (SPH) simulation to follow the formation of a rich galaxy cluster in a Λ‐cold dark matter (ΛCDM) cosmology, with the goal of understanding the origin and properties of intracluster stars. The simulation includes gas cooling, star formation, the effects of a uniform ultraviolet background and feedback from supernovae. Haloes that host galaxies as faint as MR=−19.0 are resolved by this simulation, which includes 85 per cent of the total galaxy luminosity in a rich cluster. We find that the accumulation of intracluster light (ICL) is an ongoing process, linked to infall and stripping events. The unbound star fraction varies with time between 10 and 22 per cent of the total amount of cluster stars, with an overall trend to increase with time. The fraction is 20 per cent at z= 0, consistent with observations of galaxy clusters. The surface brightness profile of the cD galaxy shows an excess compared with a de Vaucouleur profile near 200 kpc, which is also consistent with observations. Both massive and small galaxies contribute to the formation of the ICL, with stars stripped preferentially from the outer, lower‐metallicity parts of their stellar distributions. Simulated observations of planetary nebulae (PNe) show significant substructure in velocity space, tracing separate streams of stripped intracluster stars. Despite an unrelaxed distribution, individual intracluster PNe might be useful mass tracers if more than five fields at a range of radii have measured line‐of‐sight velocities, where an accurate mass calculation depends more on the number of fields than the number of PNe measured per field. However, the orbits of intracluster stars are more anisotropic than those of galaxies or dark matter, which leads to a systematic underestimate of cluster mass relative to that calculated with galaxies, if not accounted for in dynamical models. Overall, the properties of ICL formed in a hierarchical scenario are in good agreement with current observations, supporting a model where ICL originates from the dynamical evolution of galaxies in dense environments. ICL should thus be ubiquitous in galaxy clusters.