Despite boron being a common alloying element in aluminum, its segregation into the aluminum grain boundary and its effect on the grain boundary strength have not been studied. Here, the electronic structures of the boron-doped $\ensuremath{\Sigma}5(012)[100]$ symmetrical tilt grain boundary and (012) free surface systems for aluminum are investigated by means of first-principles calculations using the full-potential linearized augmented plane-wave method with the generalized gradient approximation, within the framework of the Rice-Wang thermodynamic model and the theoretical tensile test approach. We establish that boron has a large driving force to segregate from Al bulk to the symmetrical grain boundary hollow site, and its segregation significantly enhances the grain boundary strength. Through precise calculations on both the grain boundary and free surface environments, it is found that boron is a strong cohesion enhancer in aluminum with a potency of \ensuremath{-}0.19 eV/atom. An analysis in terms of the relaxed atomic and electronic structures and bonding characters shows that the aluminum-boron bond has mixed covalent and metallic character and is strong in both grain boundary and free surface environments. The strengthening effect of boron is due to creation of additional B--Al bonds across the grain boundary, which are as strong as existing Al--Al transgranular bonds and thus significantly increase grain boundary adhesion and its resistance to tensile stress and cracking.