Biologically inspired micropumps using the phenomena of peristalsis are highly involved in targeted drugging in pharmacological engineering. This study analyzed theoretically the transport of two immiscible fluids in a long flexible tube. The core region contains Johnson–Segalman non-Newtonian fluid, while the peripheral region is saturated by nanofluid. It is assumed that Darcy’s porous medium is encountered close to the walls of the tube. A complex peristaltic wave is transmitted on the compliant wall which induces the flow. Equations of continuity, momentum, energy, and nanoparticle concentration are used in modelling the problem. The modelled problem for both the regions, i.e., core and peripheral regions are developed with the assumptions of long wavelength and creeping flow. Temperature, velocity, and shear stress at the interface are assumed to be equal. The system of equations is solved analytically. The graphical results for different involving parameters are displayed and thoroughly discussed. It is received that the heat transfer goes inverse with fluid viscosity in the peripheral region, but opposite measurements are obtained in the core region. This theoretical model may be considerable in some medical mechanisms such as targeted drug delivery, differential diagnosis, and hyperthermia. Moreover, no study on non-Newtonian nanofluid is reported yet for the two-layered flow system, so this study will give a good addition in the literature of biomedical research.