The invention provides a lane line detection method based on straight lines with the maximum length.The lane line detection method includes the steps that 1, the lower half of a driving image is cut out, and edge detection is conducted on the lower half, an image is obtained after edge detection, and Hough straight line expansion is conducted on the image obtained after edge detection; 2, the straight lines, with the maximum length, located at the left side and the right side of the vertical center line of the image are selected from straight lines obtained through Hough straight line expansion; 3, the straight line, with the maximum length, on the left side is used as the left edge, the straight line, with the maximum length, on the right side is used as the right edge to define a binarization processing region, and the binarization processing region is processed in a binarization mode to obtain a binarization graph; 4, Hough straight line detection is conducted on the binarization graph, and the left and right straight lines close to the vertical center line of the image are selected as the true left and right lane lines.Color and shape information of lane line markers is fully used, and correctness of detected lane lines is ensured by using the method based on the straight lines with the maximum length and gray scale verification.