Solution strengthening mechanism of B in NbSi2 is studied by first-principles. B prefers to occupy to OI site in comparison with the TI site. B element results in brittle-to-ductile transition for NbSi2. B element weakens the shear deformation resistance for NbSi2.