To examine the peristaltic motion of a Newtonian fluid through an axisymmetric tube, many writers assume that viscosity is either a constant or a radius exponential function in Stokes’ equations. In this study, viscosity is predicated on both the radius and the axial coordinate. The peristaltic transport of a Newtonian nanofluid with radially varying viscosity and entropy generation has been studied. Under the long-wavelength assumption, fluid flows through a porous media between co-axial tubes, with heat transfer. The inner tube is uniform, while the outer tube is flexible and has a sinusoidal wave travelling down its wall. The momentum equation is solved exactly, and the energy and nanoparticle concentration equations are solved using the homotopy perturbation technique. Furthermore, entropy generation is obtained. The numerical results for the behaviours of velocity, temperature, and nanoparticle concentration, as well as the Nusselt number and Sherwood number with physical problem parameters, are obtained and graphically depicted. It is discovered that as the values of the viscosity parameter and the Prandtl number rise, so does the value of the axial velocity. Temperature values decrease as the wave amplitude and radiation parameter increase. Furthermore, at high values of the dependent viscosity parameter, the fluid nanoparticle gains more active energy and can move more freely, which is the main idea behind crude oil refinement. This physical modelling is essential for some physiological flows, such as the flow of stomach juice during the insertion of an endoscope.