Population synthesis models predict that high-mass X-ray binary (HMXB) populations produced in low metallicity environments should be more X-ray luminous, a trend supported by studies of nearby galaxies. This trend may be responsible for the observed increase of the X-ray luminosity ($L_{mathrm{X}}$) per star formation rate (SFR) with redshift due to the decrease of metallicity ($Z$) at fixed stellar mass as a function of redshift. To test this hypothesis, we use a sample of 79 $zsim2$ star-forming galaxies with oxygen abundance measurements from the MOSDEF survey, which obtained rest-frame optical spectra for $sim1500$ galaxies in the CANDELS fields at $1.37<z<3.80$. Using Chandra data from the AEGIS-X Deep, Deep Field North, and Deep Field South surveys, we stack the X-ray data at the galaxy locations in bins of redshift and $Z$ because the galaxies are too faint to be individually detected. In agreement with previous studies, the average $L_{mathrm{X}}$/SFR of our $zsim2$ galaxy sample is enhanced by $approx0.4-0.8$ dex relative to local HMXB $L_{mathrm{X}}$-SFR scaling relations. Splitting our sample by $Z$, we find that $L_{mathrm{X}}$/SFR and $Z$ are anti-correlated with 97% confidence. This observed $Z$ dependence for HMXB-dominated galaxies is consistent both with the local $L_{mathrm{X}}$-SFR-$Z$ relation and a subset of population synthesis models. Although the statistical significance of the observed trends is weak due to the low X-ray statistics, these results constitute the first direct evidence connecting the redshift evolution of $L_{mathrm{X}}$/SFR and the $Z$ dependence of HMXBs.