Magnesium diboride (MgB 2) thin films were deposited on C-plane sapphire substrates by sputtering pure B and Mg targets at different substrate temperatures, and were followed by in situ annealing. A systematic study about the effects of the various growth and annealing parameters on the physical properties of MgB 2 thin films showed that the substrate temperature is the most critical factor that determines the superconducting transition temperature ( T c ), while annealing plays a minor role. There was no superconducting transition in the thin films grown at room temperature without post-annealing. The highest T c of the samples grown at room temperature after the optimized annealing was 22 K. As the temperature of the substrate ( T s ) increased, T c rose. However, the maximum T s was limited due to the low magnesium sticking coefficient and thus the T c value was limited as well. The highest T c , 29 K, was obtained for the sample deposited at 180 °C, annealed at 620 °C, and was subsequently annealed a second time at 800 °C. Three-dimensional (3D) AFM images clearly demonstrated that the thin films with no transition, or very low T c , did not have the well-developed MgB 2 grains while the films with higher T c displayed the well-developed grains and smooth surface. Although the T c of sputtered MgB 2 films in the current work is lower than that for the bulk and ex situ annealed thin films, this work presents an important step towards the fabrication of MgB 2 heterostructures using rather simple physical vapor deposition method such as sputtering.