The Moderate Resolution Imaging Spectroradiometer (MODIS) is one of the key sensors among a suite of remote sensing instruments on board the Terra and Aqua spacecrafts. Since the beginning of each mission, regularly scheduled lunar observations have been used in order to track the on-orbit gain changes of the reflective solar bands. However, for the short-wave infrared bands, 5-7 and 26, the measured signal is contaminated by both electronic crosstalk and an out-of-band response due to transmission through the MODIS filters at undesired wavelengths. These contaminating signals cause significant oscillations in the derived gain from lunar observations for these bands, which limits their use in determining the scan mirror response versus scan angle at these wavelengths. In this paper, we show a strategy for correcting the electronic crosstalk contamination using lunar observations, where the magnitude and the source of the contaminating signal is clear. For Aqua MODIS, we find that the magnitude of the electronic crosstalk contamination is small, and the lunar calibration remains relatively unaffected. For Terra MODIS, the contamination is more significant, and the electronic crosstalk correction shows a significant reduction in the oscillations of the lunar calibration results.