We present first-principles calculations of x-ray absorption spectra of graphene and hexagonal BN monolayer on the Ni͑111͒ substrate. Including dynamical core-hole screening effects according to the theory of Mahan-Nozières-de Dominics ͑MND͒ results in an overall good agreement with previously published experimental data and our new observations. This approach provides a unified first-principles description of the electronic structure and core excitations in the sp 2 -bonded materials on metal surfaces and a better insight into the dynamics of screening effects. We demonstrate in particular that the observed spectral features of graphene and hexagonal BN can be well reproduced with the MND theory, and that they are determined by a delicate balance between initial and final-state effects. X-ray absorption spectroscopy ͑XAS͒ plays an important role in revealing the electronic structure of the sp 2 -bonded layered materials such as graphite and hexagonal boron nitride ͑h-BN͒. The element and symmetry selectivity of XAS makes it a convenient tool for probing the B 2p, C 2p, and N 2p density of states ͑DOS͒ in h-BN ͑Refs. 1-7͒ and graphite. [8][9][10][11][12] However, the influence of the core hole on the spectral shape hampers a straightforward interpretation of the spectra, as was recognized already in the early works. 2,3,9,13 The near-edge absorption fine structure ͑NEXAFS͒ at the B 1s, C 1s, and N 1s thresholds in h-BN and graphite is affected differently by the corresponding core holes, due to the different core-hole screening. Therefore, a correct theoretical description of all XA spectra in h-BN and graphite is difficult from an initial or final-state approach, as well as from a transition state model, because the degree of screening is very different and unknown a priori. Moreover, it can be necessary to assume a co-existence of good and poor screening and to use different theory levels even for one and the same spectrum, e.g., C 1s NEXAFS in bulk graphite. 14 The problem of a unified theoretical description of the NEXAFS in graphite and h-BN is especially severe for the ء excitations due to the strong differences in their life time. As shown in Fig. 1, the full width at half maximum of the ء resonance ͑peak A͒ in bulk materials ͑black curves͒ varies from 0.3 eV for the B 1s −1 ء excitation to 1.1 eV for the C 1s −1 ء excitation and further to several eV for the N 1s −1 ء excitation. Since the symmetry of the potential for the core-excited electron is the same in all three cases, the strong variation in life time of the ء excitation is exclusively due to the variation in the electron density on the absorbing site resulting, in particular, in different screening behavior. The differences in the core-hole lifetime account for the different decay dynamics. The relative rate of the nonradiative participator Auger decay is about 30% for the B 1s −1 ء excitation in h-BN, 7 about 2% for the C 1s −1 ء excitation in graphite, 11 and below 0.5% for the N 1s −1 ء excitation in h-BN, 7 as determined by...