The band structures of wurtzite and zincblende III-nitrides are aligned by the electron affinities and the band gaps calculated using a unified hybrid density-functional theory. Based on the Anderson's electron-affinity rule, the conduction (and valence) band offsets of 1.60 (1.15), 2.47 (0.30), and 4.07 (1.45) eV have been extracted for wurtzite GaN/InN, AlN/GaN, and AlN/InN interfaces, where the conduction (and valence) band offsets of 1.85 (0.89), 1.32 (0.43), and 3.17 (1.32) eV have been procured for zincblende GaN/InN, AlN/GaN, and AlN/InN interfaces, respectively. The valence band edges of both wurtzite and zincblende ternary III-nitrides could be linearly interpolated because the dominant anion compositions at the valence band maximum have a weak dependence on the cation mole fractions. Contrarily, the large bowings on the conduction band edges are attributed to the cation-like nature. Both wurtzite and zincblende AlGaN behaves differently from InGaN and AlInN because (1) the conduction band edges at Γ-valley are composed of anion orbitals, which account for the linear relationship between the conduction band edges and the cation mole fractions, and (2) the conduction band edges of zincblende AlxGa1-xN shift from Γ- to X-valley when x > 0.65, which results in an anion-to- cation transition and leads to a large conduction-band-edge bowing.