The structural and electronic properties of wurtzite BAlN (0≤x≤1) are studied using density functional theory. The change of lattice parameters with increased B composition shows small bowing parameters and thus slightly nonlinearity. The bandgap exhibits strong dependence on the B composition, where transition from direct to indirect bandgap occurs at a relatively low B composition (x∼0.12) is observed, above which the bandgap of BAlN maintained indirect, thus desirable for low-absorption optical structures. The Γ-A and Γ-K indirect bandgaps are dominant at lower and higher B compositions, respectively. Density of states (DOS) of the valence band is susceptible to the B incorporation. Strong hybridization of Al, B, and N in p-states leads to high DOS near the valence band maximum. The hybridization of Al and B in s-states at lower B compositions and p-states of B at higher B compositions give rise to high DOS near lower end of the upper valence band. Charge density analysis reveals the B-N chemical bond is more covalent than the Al-N bond. This will lead to more covalent crystal with increasing B composition. Dramatic change of the heavy hole effective mass is found due to significant curvature increase of the band by minor B incorporation.