In this study, an real-time multiple-vehicle detection and tracking system in complex environments with automatic lane detection and reducing shadow effects is proposed. First, lane marks can be automatically detected, and this automation makes the proposed system more possible to deploy in the practical traffic conditions. Second, Histogram Extension (HE) addresses how to remove the effects of weather and light impact. Next, vehicle detection with Merge Boundary Rectangle Rule (MBRR) is utilized to merge fractions of moving objects which may be candidates of detected vehicles. Finally, traffic parameters are built based on a proper tracking procedure with reducing shadow effects. Experimental results show that the proposed methods are robust, accurate, and powerful to overcome complex weather conditions and traffic jams.