The major focus of the current study was the modeling of 3D Darcy–Forchheimer flow of water–CNTs nanofluid. Impacts of non-uniform heat source/sink and Ohmic heating on 3D magneto hydrodynamic flow of water–CNTs (SWCNT and MWCNT) nanofluid were assessed. The numerical analysis method ‘Runge–Kutta–Fehlberg’ was applied for existing PDEs. It was noted that the thermal boundary layer was extended for increasing Eckert numbers along $$ x\;{\text{and}}\;y $$ direction, when the fluid showed movement away from the surface. Moreover, the gap in thermal boundary layer for H2O-SWCNT was more in comparison with H2O–MWCNT nanofluid. The numerical data of this study were validated with earlier reported outcomes and were observed to have good concord.