The objective of this study is to synthesize ZnO and Mg doped ZnO (Zn1-xMgxO) nanoparticles via the sol-gel method, and characterize their structures and to investigate their biological properties such as antibacterial activity and hemolytic potential.Nanoparticles (NPs) were synthesized by the sol-gel method using zinc acetate dihydrate (Zn(CH3COO)(2) .2H(2)O) and magnesium acetate tetrahydrate (Mg(CH3COO)(2) .4H(2)O) as precursors. Methanol and monoethanolamine were used as solvent and sol stabilizer, respectively. Structural and morphological characterizations of Zn1-xMgxO nanoparticles were studied by using XRD and SEM-EDX, respectively. Photocatalytic activities of ZnO and selected Mg-doped ZnO (Zn1-xMgxO) nanoparticles were investigated by degradation of methylene blue (MeB). Results indicated that Mg doping (both 10% and 30%) to the ZnO nanoparticles enhanced the photocatalytic activity and a little amount of Zn0.90Mg0.10O photocatalyst (1.0 mg/mL) degraded MeB with 99% efficiency after 24 h of irradiation under ambient visible light. Antibacterial activity of nanoparticles versus Escherichia coli (E. coli) was determined by the standard plate count method. Hemolytic activities of the NPs were studied by hemolysis tests using human erythrocytes. XRD data proved that the average particle size of nanoparticles was around 30 nm. Moreover, the XRD results indicated that the patterns of Mg doped ZnO nanoparticles related to ZnO hexagonal wurtzite structure had no secondary phase for x <= 0.2 concentration. For 0 <= x <= 0.02, NPs showed a concentration dependent antibacterial activity against E. coli. While Zn0.90Mg0.10O totally inhibited the growth of E. coli, upper and lower dopant concentrations did not show antibacterial activity.