We analyse the overionization or proximity zone of the intergalactic matter around high-redshift quasars in a cosmological environment. In a box of 64 h(-1) Mpc base length, we employ high-resolution dark-matter-only simulations with 1024(3) particles. For estimating the hydrogen temperature and density distribution, we use the effective equation of state by Hui & Gnedin. Hydrogen is assumed to be in photoionization equilibrium with a model background flux which is fitted to recent observations of the redshift dependence of the mean optical depth and the transmission flux statistics. At the redshifts z = 3, 4 and 4.8, we select model quasar positions at the centre of the 20 most massive haloes and 100 less massive haloes identified in the simulation box. From each assumed quasar position, we cast 100 random lines of sight for two box length, including the changes in the ionization fractions by the high-resolution quasar (QSO) flux field, and derive mock Lyman alpha spectra. The proximity effect describes the dependence of the mean normalized optical depth xi = tau(eff), (QSO)/tau(eff), (Ly alpha) as a function of the ratio of the ionization rate by the QSO to that of the background field, omega = Gamma(QSO)/Gamma(UVB), that is, the profile xi = (1 + omega/a)(-0.5), where a strength parameter a is introduced. The strength parameter measures the deviation from the theoretical background model and is used to quantify any influence of the environmental density field. We improve the statistical analysis of the profile fitting in employing a moving average to the profile. We reproduce an unbiased measurement of the proximity effect which is not affected by the host halo mass. The scatter between the different lines of sight and different quasar host positions increases with decreasing redshift, sigma(log a) approximate to 0.08, 0.20 and 0.36 for z = 4.8, 4 and 3, respectively. Around the host haloes, we find only a slight average overdensity in the proximity zone at comoving radii of 1 < r(c) < 10 h(-1) Mpc. However, a clear power-law correlation of the strength parameter with the average overdensity in r(c) is found, showing an overestimation of the ionizing background in overdense regions and an underestimation in underdense regions.