In the present investigation, synthesis, characterizations and the tuning of the optical band gap (E g) of ZnO nanowires (NWs) has been successfully achieved by introducing Mg as an intentional impurity with varying concentrations Zn 1-xMg xO (x = 0, 5, 10 and 20 at. %). Although the ionic radius of Mg 2+ (0.57 Å) is close to that of Zn 2+ (0.60 Å) the crystal structure difference and large lattice mismatch between ZnO (wurtzite, 3.25 Å) and MgO (rock salt, 4.22 Å) causes phase segregation in Zn 1-xMg xO with Mg compositions between 37% < x < 62%. Optical measurements of the as grown and Mg doped ZnO NWs shows the optical bandgap tunability from ∼3.35 eV to 3.65 eV as a function of the Mg content. Rietveld refinement of XRD data for the Mg doped ZnO nanowires confirm the wurtzite structure and a continuous compaction of the lattice (in particular, the c-axis parameter) with increasing Mg content. Strong UV with weak visible emission by PL studies establishes the sensitivity of the nanostructures yield, size and band gap to the intentional impurity. This tunability of the band gap of ZnO NWs with an intentional impurity could eventually be useful for optoelectronic applications.