Direct synthesis of either 2H-MoS2 or α-MoO3 is made possible by thermolysis of the same single source precursor in either argon or air at moderate temperatures.