The IceCube Collaboration has previously discovered a high-energy astrophysical neutrino flux using neutrino events with interaction vertices contained within the instrumented volume of the IceCube detector. We present a complementary measurement using charged current muon neutrino events where the interaction vertex can be outside this volume. As a consequence of the large muon range the effective area is significantly larger but the field of view is restricted to the Northern Hemisphere. IceCube data from 2009 through 2015 have been analyzed using a likelihood approach based on the reconstructed muon energy and zenith angle. At the highest neutrino energies between 191 TeV and 8.3 PeV a significant astrophysical contribution is observed, excluding a purely atmospheric origin of these events at $5.6,sigma$ significance. The data are well described by an isotropic, unbroken power law flux with a normalization at 100 TeV neutrino energy of $left(0.90^{+0.30}_{-0.27}right)times10^{-18},mathrm{GeV^{-1},cm^{-2},s^{-1},sr^{-1}}$ and a hard spectral index of $gamma=2.13pm0.13$. The observed spectrum is harder in comparison to previous IceCube analyses with lower energy thresholds which may indicate a break in the astrophysical neutrino spectrum of unknown origin. The highest energy event observed has a reconstructed muon energy of $(4.5pm1.2),mathrm{PeV}$ which implies a probability of less than 0.005% for this event to be of atmospheric origin. Analyzing the arrival directions of all events with reconstructed muon energies above 200 TeV no correlation with known $gamma$-ray sources was found. Using the high statistics of atmospheric neutrinos we report the currently best constraints on a prompt atmospheric muon neutrino flux originating from charmed meson decays which is below $1.06$ in units of the flux normalization of the model in Enberg et al. (2008).