The current study explores the flow of a Jeffrey nanofluid with the impact of a non-uniform heat source/sink and magnetic effects over a stretching sheet by accounting for a pollutant’s transient dispersion after being released from a source outside the system. The need to enhance the efficiency of prospective future technologies, including heat exchangers, solar collectors with nanoscale solid particles suspended in the base fluid, powered engines, pharmaceutical procedures, and hybrid microelectronics, has grown recently. Graphene is treated as a nanoparticle and NaA lg as a base liquid. To emphasize the thermal integrity of the flow that is now taken into consideration, the influence of the diameter of the nanoparticle and the liquid–solid interfacial layer is also shown at the molecular level. The modeled equations are transformed into ordinary differential equations by means of the appropriate similarity transformations. Probabilists’ Hermite polynomial collocation technique is employed to solve these nonlinear dimensionless ODEs, and the graphical representations are created for certain significant values of the underlying physical parameters in the flow model. The result reveals that as Deborah number increases, velocity upsurges but temperature declines. A rise in concentration is observed when the local pollutant external source variation parameter rises. The temperature is enhanced with the advanced values of non-uniform heat source/sink parameters.