The shear viscosity of hot nuclear matter is investigated by using the mean free path method within the framework of IQMD model. Finite size nuclear sources at different density and temperature are initialized based on the Fermi-Dirac distribution. The results show that shear viscosity to entropy density ratio decreases with the increase of temperature and tends toward a constant value for $rhosimrho_0$, which is consistent with the previous studies on nuclear matter formed during heavy-ion collisions. At $rhosimfrac{1}{2}rho_0$, a minimum of $eta/s$ is seen at around $T=10$ MeV and a maximum of the multiplicity of intermediate mass fragment ($M_{text{IMF}}$) is also observed at the same temperature which is an indication of the liquid-gas phase transition.