Corrosion in oil pipelines is one of the biggest problems in the oil sector companies because of the high cost resulted from repairing the corroded parts, or replace it with another non-corroded ones, so, in this research, we study the design of nano-inhibitor and study of its structural and electronic properties of dichlorobenzene molecule (C6H4Cl2) and the effect of adding groups of Hydroxy on those properties, density functional theory (DFT) at B3LYP level with (6-31G) basis sets. The study included four new molecules, which are including monohydroxy dichlorobenzene molecule, dihydroxy dichlorobenzene, trihydroxy dichlorobenzene, and tetrhydroxy dichlorobenzene. The structural and electronic calculations have been done by using Gaussian 09 program and Gaussian View in DFT calculations. The geometry optimization using both methods for dichlorobenzene (nano-inhibitor) and group’s Hydroxy molecules has been found in good agreement with experimental data. While the electronic properties included calculate total energy, ionization potential, electron affinity, chemical potential, electronegativity, electrochemical hardness and electronic softness for molecules under study. These results show that the energy gap reduced with the increase of the number of groups; also, the electron affinity and electronegativity for dichlorobenzene molecule Ben-Cl-2OH are the lowest, while the chemical potential be the highest for the same inhibitor. Nano-inhibitor result reduces corrosion of internal surfaces of tubes that used for transporting oil and gas to the importance of these molecules in terms of their high ability for interaction. Those dichlorobenzene can restrain corrosion from claiming steel toward framing an inactive layer for this molecule on the metal's surface.