Electron acceleration mechanism at high Mach number collisionless shocks propagating in a weakly magnetized medium is investigated by a self-consistent two-dimensional particle-in-cell simulation . Simulation results show that strong electrostatic waves are excited via the electron-ion electrostatic two-stream instability at the leading edge of the shock transition region as in the case of earlier one-dimensional simulations . We observe strong electron acceleration that is associated with the turbulent electrostatic waves in the shock transition region . The electron energy spectrum in the shock transition region exhibits a clear power-law distribution with spectral index of 2.0 { - } 2.5 . By analyzing the trajectories of accelerated electrons , we find that the acceleration mechanism is very similar to shock surfing acceleration of ions . In contrast to the ion shock surfing , however , the energetic electrons are reflected by electron-scale electrostatic fluctuations in the shock transition region , but not by the ion-scale cross-shock electrostatic potential . The reflected electrons are then accelerated by the convective electric field in front of the shock . We conclude that the multidimensional effects as well as the self-consistent shock structure are essential for the strong electron acceleration at high Mach number shocks .