High pressure study on ultra-hard transition-metal boride Os2B3 was carried out in a diamond anvil cell under isothermal and non-hydrostatic compression with platinum as an x-ray pressure standard. The ambient-pressure hexagonal phase of Os2B3 is found to be stable with a volume compression V/V0 = 0.670 0.009 at the maximum pressure of 358 7 GPa. Anisotropic compression behavior is observed in Os2B3 to the highest pressure, with the c-axis being the least compressible. The measured equation of state using the 3rd-order Birch-Murnaghan fit reveals a bulk modulus K0 = 397 GPa and its first pressure derivative K_0prime = 4.0. The experimental lattice parameters and bulk modulus at ambient conditions also agree well with our density-functional-theory (DFT) calculations within an error margin of 1%. DFT results indicate that Os2B3 becomes more ductile under compression, with a strong anisotropy in the axial bulk modulus persisting to the highest pressure. DFT further enables the studies of charge distribution and electronic structure at high pressure. The pressure-enhanced electron density and repulsion along the Os and B bonds result in a high incompressibility along the crystal c-axis. Our work helps to elucidate the fundamental properties of Os2B3 under ultrahigh pressure for potential applications in extreme environments.