This article mainly addresses the influence of the viscous dissipation, melting, and chemical reaction on Williamson and Maxwell nanofluids over a stretching sheet embedded in porous media. The system of partial differential equations which is obtained by conservation principles, is transformed by means of an appropriate similarity transformation into a system of ordinary differential equations. The numerical results are obtained by employing the Keller box method. The impacts of different germane parameters on velocity profiles, thermal and concentration fields, Nusselt number, skin friction coefficient, and Sherwood number are selected by means of graphical and tabular representations. Our numerical solution detects that the dimensionless melting parameter highly affects the velocity boundary layer of a Williamson nanofluid when compared with an upper-convected Maxwell nanofluid. Moreover, the velocity, temperature, and concentration distributions decrease for both fluids when the permeability parameter increases. Furthermore, the temperature distribution increases with an increase of the Eckert number.