In this article, the prediction of dynamic viscosity (μnf) of MgO-MWCNTs/SAE40 engine oil nanofluid (NF) using artificial neural network (ANN) is investigated in different conditions (temperatures, volume fractions (φ) and shear rates). In this research, the Multi-layer perceptron (MLP ANN with Levenberg–Marquardt (ML) algorithm is used for modeling by ANN. The optimal structure is selected from a set of 400 different ANN structures for MWCNT- MgO (20:80)/SAE40 NF, including two hidden layers with 10 neurons in the first layer and 4 neurons in the second layer. φ, shear rate and temperature are considered input parameters and predicted μnf is considered as an output parameter in ANN modeling. The results show that the optimal ANN with 8 neurons per layer has the minimum mean square error (MSE) and the maximum regression coefficient R close to 1 for predicting μnf. The range of MODs is −2% < MOD<2%. The comparison of three groups of laboratory data, calculation and ANN prediction shows that the data predicted by ANN is much more capable than the new relation and estimates the laboratory data more accurately.