ZnO nanostructures of different morphologies were grown by immersing eggshell membranes into Zn(NO3)2 ethanol solution with different pH values and subsequently sintered at 500 degrees C. Effects of the solution pH value, immersing time and Mg incorporation on the nanostructure morphology and photoluminescence were studied. ZnO nanostructure morphology was very sensitive to pH value of the solution, immersing time and layer of the templates. Different morphologies of nanofibers, nanotubes, hexagonal nanosheets and hexagonal nanosheets with tips were grown. All nanostructures had strong green emission at 520 nm and weak ultraviolet emission at 377 nm. The green emission weakened in the interwoven nanofibers while the ultraviolet emission enhanced in the hexagonal nanosheets. Incorporation of Mg ions in the solution with a pH of 7 would result in combination of the interwoven nanofibers and enhance the green emission greatly. UV emission at 355 nm from ZnMgO alloys was observed in Mg incorporated nanofibers.