Combing the three-dimensional radiative transfer ( RT ) calculation and cosmological SPH simulations , we study the escape fraction of ionizing photons ( f _ { esc } ) of high-redshift galaxies at z = 3 - 6 . Our simulations cover the halo mass range of M _ { h } = 10 ^ { 9 } -10 ^ { 12 } M _ { \odot } . We postprocess several hundred simulated galaxies with the Authentic Radiative Transfer ( ART ) code to study the halo mass dependence of f _ { esc } . In this paper , we restrict ourselves to the transfer of stellar radiation from local stellar population in each dark matter halo . We find that the average f _ { esc } steeply decreases as the halo mass increases , with a large scatter for the lower mass haloes . The low mass haloes with M _ { h } \sim 10 ^ { 9 } M _ { \odot } have large values of f _ { esc } ( with an average of \sim 0.4 ) , whereas the massive haloes with M _ { h } \sim 10 ^ { 11 } M _ { \odot } show small values of f _ { esc } ( with an average of \sim 0.07 ) . This is because in our simulations , the massive haloes show more clumpy structure in gas distribution , and star-forming regions are embedded inside these clumps , making it more difficult for the ionizing photons to escape . On the other hand , in low mass haloes , there are often conical regions of highly ionized gas due to the shifted location of young star clusters from the center of dark matter halo , which allows the ionizing photons to escape more easily than in the high-mass haloes . By counting the number of escaped ionizing photons , we show that the star-forming galaxies can ionize the intergalactic medium at z = 3 - 6 . The main contributor to the ionizing photons is the haloes with M _ { h } \lesssim 10 ^ { 10 } M _ { \odot } owing to their high f _ { esc } . The large dispersion in f _ { esc } suggests that there may be various sizes of H ii bubbles around the haloes even with the same mass in the early stages of reionization . We also examine the effect of UV background radiation field on f _ { esc } using simple , four different treatment of UV background .