We use large cosmological smoothed particle hydrodynamics simulations to study the formation and evolution of submillimetre galaxies (SMGs). In our previous work, we studied the statistical properties of ultraviolet-selected star-forming galaxies at high redshifts. We populate the same cosmological simulations with SMGs by calculating the reprocessing of stellar light by dust grains into far-infrared to millimetre wavebands in a self-consistent manner. We generate light-cone outputs to compare directly the statistical properties of the simulated SMGs with available observations. Our model reproduces the submillimetre source number counts and the clustering amplitude. We show that bright SMGs with flux S > 1 mJy reside in haloes with masses of ∼1013 M⊙ and have stellar masses greater than 1011 M⊙. The angular cross-correlation between the SMGs and Lyman α emitters is significantly weaker than that between the SMGs and Lyman-break galaxies. The cross-correlation is also weaker than the autocorrelation of the SMGs. The redshift distribution of the SMGs shows a broad peak at z ∼ 2, where bright SMGs contribute significantly to the global cosmic star formation rate density. Our model predicts that there are hundreds of SMGs with S > 0.1 mJy at z > 5 per 1 deg2 field. Such SMGs can be detected by ALMA.