This work investigates the charge transfer and A1 (Ga) p-Ni d hybridization effects in the intermetallic Ni3Al (Ni3Ga) alloy using the Ni L3~- and K-edge and Al (Ga) K x-ray absorption near edge structure (XANES) measurements. We find that the intensity of white-line features at the Ni L3~-edge in the Ni3Al (Ni3Ga) alloy decreased in comparison with that of pure Ni, which can be attributed to the enhancement of Ni 3d states filling and the depletion of the density of Ni 3d unoccupied states in the Ni3A1 (Ni3Ga) alloy. Two clear features are also observed in the Ni3Al (Ni3Ga) XANES spectrum at the Al (Ga) K-edge, which can be assigned to the Al (Ga) unoccupied 3p (4p) states and their hybridized states with the Ni 3d/4sp states above the Fermi level in Ni3Al (Ni3Ga). The threshold at Al K-edge XANES for Ni3Al clearly shifts towards higher photon energies relative to that of pure Al, indicating that Al loses charges upon forming Ni3AI. On the other hand, the Ni K-edge shifts towards lower photon energies in Ni3Al (Ni3Ga) relative to that of pure Ni, which is consistent with the results of the Al K-edge XANES spectrum and is indicative of a charge transfer from Al to Ni sites. Our data support that no significant net charge flow occurs on and off sites in Ni3AI 0Nli3Ga ).