Investigation of nanofluid flows under various conditions is becoming fascinating research due to its numerous applications in many science and engineering fields such as solar energy, geothermal energy, water purification, glass blowing, enhanced oil recovery, petroleum production and food processing. For the present requirements in thermal energy applications, this mathematical model is considered to explore the diffusion and heat source effects on the flow of conductive Casson and Maxwell nanofluids in a porous medium on an elongating sheet with a chemical reaction. Further, the effects of viscous dissipation and thermal radiation are also examined. Moreover, the entropy generation is analyzed since this approach is employed in solar energy exchangers. The governing equations and the corresponding boundary conditions are constructed. This system of partial differential equations (PDEs) is changed into a system of nonlinear ordinary differential equations (ODEs) with the help of a suitable transformation and then solved numerically by the bvp5c MATLAB package. The influences of the physical parameters on the flow phenomena are discussed and presented through figures and tables. This analysis explains that the Casson fluid flow has a higher velocity field than the Maxwell fluid flow. The Nusselt number becomes higher as the Dufour numbers increase. It has also been noticed that increasing the Brinkmann number improves the entropy and, an increase in radiation enriches the temperature profile. The concentration of the fluid is decreased for the increasing values of the higher-order chemical reaction parameter. Furthermore, comparisons of the current results were conducted for limiting examples of the problem and found to be in good agreement with existing results in the literature.