Following Cui et al. (2018; hereafter Paper I) on the classification of large-scale environments (LSE) at z = 0, we push our analysis to higher redshifts and study the evolution of LSE and the baryon distributions in them. Our aim is to investigate how baryons affect the LSE as a function of redshift. In agreement with Paper I, the baryon models have negligible effect on the LSE overall investigated redshifts. We further validate the conclusion obtained in Paper I that the gas web is an unbiased tracer of total matter - even better at high redshifts. By separating the gas mainly by temperature, we find that about 40 per cent of gas is in the so-called warm-hot intergalactic medium (WHIM). This fraction of gas mass in theWHIM decreases with redshift, especially from z=1 (29 per cent) to z=2.1 (10 per cent). By separating the whole WHIM gas mass into the four large-scale environments (i.e. voids, sheets, filaments, and knots), we find that about half of the WHIM gas is located in filaments. Although the total gas mass inWHIM decreases with redshift, the WHIM mass fractions in the different LSE seem unchanged.