We derive the UV-optical stellar dust attenuation curve of galaxies at z = 1.4 - 2.6 as a function of gas-phase metallicity , using a sample of 218 galaxies from the MOSFIRE Deep Evolution Field ( MOSDEF ) survey with H \alpha , H \beta , and [ N ii ] \lambda 6585 spectroscopic measurements . We constrain the shape of the attenuation curve by comparing the average flux densities of galaxies sorted into bins of dust obscuration using Balmer decrements , i.e. , H \alpha -to-H \beta luminosities . The average attenuation curve for the high-metallicity sample ( 12 + \log ( { O / H } ) > 8.5 , corresponding to M _ { * } \gtrsim 10 ^ { 10.4 } { M _ { \odot } } ) has a shallow slope , identical to that of the Calzetti local starburst curve , and a significant UV 2175 Å extinction bump that is \sim 0.5 \times the strength of the Milky Way bump . On the other hand , the average attenuation curve of the low-metallicity sample ( 12 + \log ( { O / H } ) \sim 8.2 - 8.5 ) has a steeper slope similar to that of the SMC curve , although consistent with the Calzetti slope at the 3 \sigma level . The UV bump is not detected in the low-metallicity curve , indicating the relative lack of the small dust grains causing the bump at low metallicities . Furthermore , we find that on average the nebular reddening ( E ( B - V ) ) is a factor of 2 times larger than that of the stellar continuum for galaxies with low metallicities , while the nebular and stellar reddening are similar for galaxies with higher metallicities . This result is likely due to dusty stellar populations dominating both the continuum and emission line photons in the high-metallicity galaxies , which have larger fractions of dust-obscured regions .