We are interested in Monte Carlo (MC) methods for solving the diffusion equation: in the case of a constant diffusion coefficient, the solution is approximated by using particles and in every time step, a constant stepsize is added to or subtracted from the coordinates of each particle with equal probability. For a spatially dependent diffusion coefficient, the naive extension of the previous method using a spatially variable stepsize introduces a systematic error: particles migrate in the directions of decreasing diffusivity. A correction of stepsizes and stepping probabilities has recently been proposed and the numerical tests have given satisfactory results. In this paper, we describe a quasi-Monte Carlo (QMC) method for solving the diffusion equation in a spatially nonhomogeneous medium: we replace the random samples in the corrected MC scheme by low-discrepancy point sets. In order to make a proper use of the better uniformity of these point sets, the particles are reordered according to their successive coordinates at each time step. We illustrate the method with numerical examples: in dimensions 1 and 2, we show that the QMC approach leads to improved accuracy when compared with the original MC method using the same number of particles.