Molecular dynamics (MD) simulations, based on a new coordination-dependent charge-transfer potential, were used to study the behavior of B2O3 in response to various thermal and mechanical constraints. This interaction potential allows for the charges on atoms to redistribute upon the formation and rupture of chemical bonds, and dynamically adjusts to multiple coordination states for a given species. Our simulations reveal the structural origin of the anomalous thermomechanical behaviors of B2O3, such as the increase of mechanical moduli upon expansion of the structure. While this phenomenon has been experimentally observed in the glass just below T-g and in the molten state above 800 degrees C, our simulations predict for the first time that the mechanical moduli of B2O3 glass also increase upon expansion under tensile stress. These anomalous behaviors can be explained as the result of localized structural transformations between two motifs of different stiffness that are similar to those found in the material's crystalline counterparts. The mechanism we found for B2O3 is analogous to the one we identified earlier as underlying the anomalous behaviors of SiO2, and appears to be universal for network-forming glasses. Furthermore, our simulations led us to the discovery of new low-density B2O3 crystals, which provide a key to understanding the anomalous thermomechanical behaviors of vitreous B2O3 and the crystallization anomaly of this compound.