We have studied the relationship between the structure and the spin Hall angle of the early 5d transition metals in X/CoFeB/MgO (X = Hf, Ta, W, and Re) heterostructures. Spin Hall magnetoresistance (SMR) is used to characterize the spin Hall angle of the heavy metals. Transmission electron microscopy images show that all underlayers are amorphous-like when their thicknesses are small, however, crystalline phases emerge as the thickness is increased for certain elements. We find that the heavy metal layer thickness dependence of the SMR reflects these changes in structure. The largest spin Hall angle vertical bar theta(SH)vertical bar of Hf, Ta, W, and Re (similar to 0.11, 0.10, 0.23, and 0.07, respectively) is found when the dominant phase is amorphous-like. We find that the amorphous-like phase not only possesses large resistivity but also exhibits sizeable spin Hall conductivity, which both contribute to the emergence of the large spin Hall angle. (C) 2015 AIP Publishing LLC.