In this paper, the fluid flow and heat transfer of nano-fluid in the presence of magnetic field with sinusoidal variation in cavity is investigated numerically. The continuity, momentum and energy equations are solved with control volume finite volume approach and applying SIMPLE method for dealing velocity and pressure field. The Stones technique used for solving algebraic equations. The effect of frequency of magnetic field was studied and it was observed by increasing the frequency from 1 Hz to 3 Hz the Nu number increases, but then decreases for frequency more than 3 Hz and finally approaches to a fixed value, asymptotically.