We report the discovery of a massive protostar M17~MIR embedded in a hot molecular core in M17. The multiwavelength data obtained during 1993--2019 show significant mid-IR (MIR) variations, which can be split into three stages: the decreasing phase during 1993.03--mid-2004, the quiescent phase from mid-2004 to mid-2010, and the rebrightening phase from mid-2010 until now. The variation of the 22\,GHz H2O maser emission, together with the MIR variation, indicates an enhanced disk accretion rate onto M17~MIR during the decreasing and rebrightening phases. Radiative transfer modeling of the spectral energy distributions of M17~MIR in the 2005 epoch (quiescent) and 2017 epoch (accretion outburst) constrains the basic stellar parameters of M17~MIR, which is an intermediate-mass protostar (M~5.4 Msun) with accretion rate ~1.1x10^-5 Msun in the 2005 epoch and ~1.7x10^-3 Msun/yr in the 2017 epoch. The enhanced accretion rate during outburst induces the luminosity outburst ΔL≈7600Lsun. In the accretion outburst, a larger stellar radius is required to produce accretion rate consistent with the value estimated from the kinematics of water masers. M17 MIR shows two accretion outbursts (Δt∼9−20 yr) with outburst magnitudes of 2 mag, separated by a 6 yr quiescent phase. The accretion outbusrt occupies 83\% of the time over 26 yr. The accretion rate in outburst is variable with amplitude much lower than the contrast between quiescent and outburst phases. The extreme youth of M17 MIR suggests that minor accretion bursts are frequent in the earliest stages of massive star formation.