We investigate the chemical enrichment of r-process elements in the early evolutionary stages of the Milky Way halo within the framework of hierarchical galaxy formation using a semi-analytic merger tree. In this paper, we focus on heavy r-process elements, Ba and Eu, of extremely metal-poor (EMP) stars and give constraints on their astronomical sites. Our models take into account changes of the surface abundances of EMP stars by the accretion of interstellar matter (ISM). We also consider metal-enrichment of intergalactic medium (IGM) by galactic winds and the resultant pre-enrichment of proto-galaxies. The trend and scatter of the observed r-process abundances are well reproduced by our hierarchical model with $sim 10%$ of core-collapse supernovae in low-mass end ($sim 10M_{odot}$) as a dominant r-process source and the star formation efficiency of $sim 10^{-10} hbox{yr}^{-1}$. For neutron star mergers as an r-process source, their coalescence timescale has to be $ sim 10^7$yrs, and the event rates $sim 100$ times larger than currently observed in the Galaxy. We find that the accretion of ISM is a dominant source of r-process elements for stars with [Ba/H] < -3.5. In this model, a majority of stars at [Fe/H] < -3 are formed without r-process elements but their surfaces are polluted by the ISM accretion. The pre-enrichment affects $sim 4%$ of proto-galaxies, and yet, is surpassed by the ISM accretion in the surface of EMP stars.