We have fabricated a four-layer polarity-inverted aluminum nitride (AlN) structure using a combination of sputtering and face-to-face annealing. We investigated the impurity concentrations and structure of the polarity inversion-domain boundaries (IDBs) of the four-layer polarity-inverted AlN structure. Atomic-scale observations revealed that the interface of the IDBs from Al-polar AlN to N-polar AlN consists of three monolayers (MLs) of O-Al-O, while the IDBs from N-polar AlN to Al-polar AlN consist of 8–10 ML of AlxOyNz. Additionally, the positions of the IDBs from N-polar AlN to Al-polar AlN shifted by 20–30 nm from the interface of sputtered AlN toward the surface, whereas those from Al-polar AlN to N-polar AlN remained at the same position as the interface of sputtered AlN. The interface energies of these IDBs were investigated using first-principles calculations, which support the O-Al-O structure for the IDB from Al-polar AlN to N-polar AlN and the AlxOyNz structure for the IDBs from N-polar AlN to Al-polar AlN.