The search for elemental allotropes is an active research field to get unusual structures with unique properties. The removal of metal atoms from pressure-induced stable binary compounds has become a useful method for obtaining elemental allotropes with interesting properties that otherwise would not be accessible at ambient pressure. Although three-dimensional boron allotropes have been studied extensively, none of those found so far are superconducting at ambient pressure. Here we propose that $\mathrm{Na}{\mathrm{B}}_{4}$ and $\mathrm{N}{\mathrm{a}}_{2}{\mathrm{B}}_{17}$ can be used as precursors to achieve superconducting boron allotropes at ambient pressure. First-principle swarm-intelligence structure search calculations identify several novel sodium borides (e.g., $\mathrm{N}{\mathrm{a}}_{3}{\mathrm{B}}_{2},\mathrm{N}{\mathrm{a}}_{2}{\mathrm{B}}_{3},\mathrm{Na}{\mathrm{B}}_{4}$, and $\mathrm{N}{\mathrm{a}}_{2}{\mathrm{B}}_{17})$ under high pressure. Interestingly, the B atoms in $I4/mmm\phantom{\rule{4pt}{0ex}}\mathrm{Na}{\mathrm{B}}_{4}$ and $Pm\phantom{\rule{0.28em}{0ex}}\mathrm{N}{\mathrm{a}}_{2}{\mathrm{B}}_{17}$ form three-dimensional frameworks with open channels, where Na atoms are located. After the removal of Na atoms, two hitherto unknown boron allotropes, named as $I4/mmm{\mathrm{B}}_{4}$ and $Pm\phantom{\rule{0.28em}{0ex}}{\mathrm{B}}_{17}$, are stable at ambient pressure. They are metallic with superconducting critical temperatures of 19.8 and 15.4 K, respectively, becoming the highest ones among bulk boron allotropes. In addition, considering their predicted Vickers hardness of 27.3 and 26.8 GPa, they are also potential hard materials.