A measurement of the atmospheric muon neutrino energy spectrum from 100 GeV to 400 TeV was performed using a data sample of about 18,000 up-going atmospheric muon neutrino events in IceCube. Boosted decision trees were used for event selection to reject mis-reconstructed atmospheric muons and obtain a sample of up-going muon neutrino events. Background contamination in the final event sample is less than one percent. This is the first measurement of atmospheric neutrinos up to 400 TeV, and is fundamental to understanding the impact of this neutrino background on astrophysical neutrino observations with IceCube. The measured spectrum is consistent with predictions for the atmospheric muon neutrino plus muon antineutrino flux.