This study investigates the effect of Li and Mg codoping on the structural, optical, and electrical properties of the ZnO. Zn0.95−xLi0.05MgxO (x = 0.00, 0.01, 0.02, 0.03) nanoparticles are synthesized by hydrothermal method. X‐ray diffraction (XRD) results confirmed that all samples are polycrystalline with a hexagonal‐wurtzite structure. The surface morphology of the samples were examined by Scanning Electron Microscopy (SEM). The SEM analysis showed that all samples exhibit cheese‐like plates and the plate sizes increase with Mg addition. Optical properties were examined by UV‐VIS diffuse reflectance spectroscopy. The optical measurements indicate that the reflectance edge of the samples have red shift up to 2% Mg doping level, but blue‐shift for 3% Mg doping. The optical band gap of Zn0.95−xLi0.05MgxO nanostructures are calculated as 3.227, 3.214, 3.209, and 3.221 eV with x = 0.00, 0.01, 0.02, 0.03 respectively. Electrical properties including the carrier concentration, Hall mobility, and resistivity were studied using Van‐der Pauw method. The temperature resistivity curves of the samples shown typical semiconductor behavior. The carrier concentration decreases with increasing doping level up to 2% Mg, and it slightly increases for 3% Mg. The variation of the Hall mobility for the samples is inversely proportional to the carrier concentration.