We prove a moderate deviation principle for the capacity of the range of random walk in \(\mathbb {Z}^5\) . Depending on the scale of deviation, we get two different regimes. We observe Gaussian tails when the deviation scale is smaller than \(n^{1/2} (\log n)^{3/4}\) . Otherwise, we get non-Gaussian tails with a constant arising from a generalized Gagliardo-Nirenberg inequality. This is analogous to the behavior of the volume of the random walk range in \(\mathbb {Z}^3\) . Our methods can also be applied to the \(d = 4\) case to prove the moderate deviation principle in almost the full range of interest. This extends the work of Okada and the first author [1], where they showed moderate deviations up to a deviation scale of \(\log \log n\) times the standard deviation.