  We discuss the possibility of explaining the recent NANOGrav results by
inflationary gravitational waves (IGWs) with a blue-tilted primordial spectrum.
Although such IGWs can account for the NANOGrav signal without contradicting
the upper bound on the tensor-to-scalar ratio at the cosmic microwave
background scale, the predicted spectrum is in strong tension with the upper
bound on the amplitude of the stochastic gravitational wave background by
big-bang nucleosynthesis (BBN) and the second LIGO-Virgo observation run.
However, the thermal history of the Universe, such as reheating and late-time
entropy production, affects the spectral shape of IGWs at high frequencies and
permits evading the upper bounds. We show that, for the standard reheating
scenario, when the reheating temperature is relatively low, a blue tensor
spectrum can explain the recent NANOGrav signal without contradicting the BBN
and the LIGO-Virgo constraints. We further find that, when one considers a
late-time entropy production, the NANOGrav signal can be explained even for an
instant reheating scenario.
