In order to reduce the operation difficulty, improve the production effect after sidetracking, prolong the oil well production life and ensure the borehole could be utilized again, sidetracking way were compared between shallow and deep sidetracking in order to optimize sidetracking way and reduce the difficulty of operation. Combined with the problems in the production process of lateral drilling, the advantages and disadvantages of different well structure after sidetracking were analyzed to optimize well structure. For horizontal wells with large mudstone, sand production and serious flooding in horizontal section, the scheme of perforating and completion of casing horizontal wells and gravel filling and sand controlling are designed. For horizontal wells penetrated with large shale in horizontal section, the situation of sand control pipe string sticking can be avoided.For horizontal wells with sand production and serious flooding in horizontal section, perforation in flooded well section can be avoided, and production effect could be improved. Gravel filling and completion can reduce sand production risk and prolong production life.