To investigate the effect of the magnetic field, a pulsating heat pipe was made in the shape of a cylinder and Fe3O4 nanoparticles (%0.1 wt) were used with the base fluid of distilled water as the working fluid. (Tetramethyl ammonium hydroxide) TMAH surfactant was used as a stabilizer. To investigate the effect of gravity on the performance of the pipe, the device was tested at different angles from zero to 90 degrees. In this research, the effect of different variables, including the type of working fluid (distilled water vs. nanofluid), filling ratio, slope, and amount of heat input to the evaporator (30–300 W), in two different states, once without the influence of the magnetic field and once again with the application of a magnetic field was investigated. The results of the tests showed that the performance of the device at 50 % filling ratio is better than 60 % filling ratio. The use of nanoparticles improved the performance of the device. Inclining the device increases the thermal resistance so that the device performs poorly in the horizontal mode in all modes except when it is under the influence of a magnetic field. The use of nanofluid as well as the application of a magnetic field makes the start-up time of the device decrease by 37 % and 30 %, respectively, compared to distilled water. The temperature of the start of fluctuations also decreases by 24 % and 32 %, respectively.