The goal of this paper is to examine the motion of a Maxwell nanofluid, including molybdenum disulfide and graphene nanoparticles, with ramped wall temperature (RWT) and isothermal wall temperature (IWT) at the barrier, by considering engine oil as the working fluids. The basic flow equation is converted to first-order ODEs by introducing the new variables. Using the numerical algorithm, the generated non-dimensional set of equations is computed using Runge–Kutta fourth-order method built-in function in MATLAB SOFTWARE with size . The iteration procedure was stopped until all of the nodes in the η-direction met the convergence condition 10−5. For confirmation of the results, the BVPh2 package is also applied. The physical parameters of interest such as local skin friction and Nusselt number are formulated and explained by tables. Lastly, the influence of molybdenum disulfide and graphene nanoscale on the convective heat and mass profiles of Maxwell ferrofluid is briefly explored. The novel part of this work is to examine the heat transfer analysis in engine oil base of Maxwell fluid with ramp and isothermal wall temperature conditions numerically, which has not been done in the published literature to date. Therefore, in the limiting sense, the present work is compared with published work.