Finally, I've got the answer for this question. Ba3N2 is an ionic compound. The ionic compound contains 3 Ba2+ cations and 2 N3- anions. Since it's ionic compound, there will be completely transfer of electrons from less electronegative atom to more electronegative atom.
[Ba]2+
[Ba]2+ [N]3-
[Ba]2+ [N]3-
Each Ba has lost 2 electrons in its outermost shell to form Ba2+. Three Ba have lost totally 6 electrons. These 6 electrons will move to Nitrogen to form N3-
Each Nitrogen will receive 3 electrons from Barium. Therefore, each Nitrogen is surrounded by 8 electrons, 5 of them belong to Nitrogen itself and the other 3 of them belong to Barium.