© 2021 International Solar Energy SocietyNickel oxide as a popular hole transport material was frequently investigated through, Li, Co, Li-Co and Li-Mg co-doping strategies in the literature. Here, we report a new route based on the synergetic effect of Li-Co-Mg doping for nickel oxide using sol–gel method. For an optimized doping ratio, we observed a clear improvement in the photovoltaic performance of methylammonium lead triiodide (CH3NH3PbI3) based inverted perovskite solar cells that were fabricated in ambient air, under high humidity (>50%). Li-Co-Mg doping increased the work function, hole concentration, hole mobility, and electrical conductivity of the NiOx hole transport layers (HTLs). The addition of Co resulted in an undesired drop in the optical transmittance while increasing the surface roughness of the NiOx. It was witnessed that Mg addition healed both the transmittance and interface between HTL and perovskite. Even for the precursor solution, we noticed that by the addition of Mg into the Li and Co-doped NiOx precursor, the solution became more transparent and stable. Photovoltaic measurements revealed that the short-circuit current density increased from 17.3 to 23.9 mA cm−2, the open-circuit voltage was boosted from 0.932 to 1.06 V, and the fill factor was improved from 0.46 to 0.52. Consequently, power conversion efficiencies were found to be increased by up to 13.22% from 7.47% by the Li-Co-Mg doping. We believe our results demonstrate that Li, Co and Mg doping might be a promising way for adapting nickel oxide hole transport layers for CH3NH3PbI3 based perovskite solar cells.