Heat transfer of a CuO/water nanofluid in a two‐phase closed thermosyphon (TPCT) that is thermally enhanced by a magnetic field has been predicted by an optimized artificial neural network (ANN). The magnetic field strength, volume fraction of nanoparticles in water, and inlet power were used as input parameters and the thermal efficiency was used as the output parameters. The correlation coefficient (R2 = 0.924), mean square error (MSE = 0.000340231), mean absolute error (MAE = 0.012410941), and normalized mean‐squared error (NMSE = 0.112417498) between the measured and predicted thermal efficiency by the ANN model were developed. The results were compared with experimental data and it was found that the thermal efficiency estimated by the multi‐layer perception neural network is accurate. In this study, a new approach for the auto‐design of neural networks, based on a genetic algorithm, has been used to predict collection output of a TPCT. © 2013 Wiley Periodicals, Inc. Heat Trans Asian Res, 42(7): 630–650, 2013; Published online in Wiley Online Library (http://wileyonlinelibrary.com/journal/htj). DOI 10.1002/htj.21043