Superconducting MgB2 thin films have been prepared using Ultrasonic Spray Pyrolysis (USP) system. 2.4 MHz USP system and various solutions which contain different Mg, B and de-ionized water and LAPSA concentrations and gas atmospheres were used to obtain 500 nm to 1.0 mu m thick MgB2 films. Some of the films produced were heat treated in-situ in the spraying chamber during deposition and some of them were annealed ex-situ in the tube furnace under Mg vapor. T (c) and T (zero) of the samples were obtained to be 39.5 K and 37.4, 39.5 and 37.0 for ex-situ and in-situ prepared films, respectively. The highest critical current density was obtained to be 4.12x10(6) A cm(-2) for ex-situ annealed films and 4.01x10(6) A cm(-2) for in-situ produced films. The result obtained indicated that the ex-situ preparation method provides improvement in the transport and magnetic properties.