WB4.2is one of the hardest metals known. Though not harder than diamond and cubic boron nitride, it surpasses these established hard materials in being cheaper, easier to produce and process, and also more functional. Metal impurities have been shown to affect and in some cases further improve the intrinsic hardness of WB4.2, but the mechanism of hardening remained elusive. In this work we first theoretically elucidate the preferred placements of Ti, V, Cr, Mn, Zr, Nb, Mo, Hf, Ta in the WB4.2 structure, and show these metals to preferentially replace W in two competing positions with respect to the partially occupied B3-cluster site. The impurities avoid the void position in the structure. Next, we analyze the chemical bonding within these identified doped structures, and propose two different mechanisms of strengthening the material, afforded by these impurities, and dependent on their nature. Smaller impurity atoms (Ti, V, Cr, Mn) with deeply lying valence atomic orbitals cause the inter-layer compression of WB4.2, which strengthens the Bhex-Bclusterbonding slightly. Larger impurities (Zr, Nb, Mo, Hf, Ta) with higher-energy valence orbitals, while expanding the structure and negatively impacting the Bhex-Bclusterbonding, also form strong BclusterMbonds. The latter effect is an order of magnitude more substantial than the effect on the Bhex-Bcluster bonding. We conclude that the effect of the impurities on the boride hardness does not simply reduce to structure interlocking due to the size difference between M and W, but instead, has a significant electronic origin.