Spatial distribution of the edge states in the quantum Hall (QH) effect has been investigated by the magnetocapacitance technique. The relation between the edge states and electron distribution at the sample boundary in the QH regime has been discussed. We have measured the capacitance between a two dimensional electron system and each thin wire gate at 0.4 K with applying negative voltage to the side gate and obtained the local density profile near the sample boundary. The spatial profile of confinement potential is much gentle when strong negative side gate bias is applied and the electron density at the interior region (more than 10 mum far from the side gate) is affected by side gate voltage. (C) 2003 Elsevier B.V. All rights reserved.