The existence of a stochastic gravitational wave background is indicated by the recent pulsar timing array (PTA) experiments. We study the enhanced production of second-order gravitational waves from the scalar perturbations when the universe experiences a transition from the early matter-dominated era to the radiation-dominated era due to Q-ball decay. We extend the analysis in previous work by including the frequency range where density perturbations go non-linear and find that the resultant gravitational wave spectrum can be consistent with that favored by the recent PTA experiment results.