This paper seeks to improve the understanding of under-deposit corrosion and the effectiveness of the inhibitors with sand deposits especially under CO2 corrosion environment in flow line of oil field. Corrosion experiments were conducted on API X65 steel specimens covered by sand deposits using high temperature high pressure autoclaves. The corrosion rates of the steel covered by sand deposits in simulated formation water with and without inhibitors were calculated. The effects of sand deposit compactness on the corrosion inhibitor performance were also investigated. The open circuit potential and the polarization curve before and after the injection of inhibitors were tested to further determine the corrosion inhibitor performance. Electrochemical behavior might different between the under-deposit specimens with and without inhibitors. The galvanic effect which leads to localized corrosion between the steel surface with and without sand deposit was also investigated. Other factors such as the thickness and the particle size of the sand deposits the movement of fluid were considered and discussed.