The invention provides a lane line detection method for lane departure early warning. The method includes the edge detection step and the lane line recognition step. In the edge detection step, edge detection is conducted on images through a stepped edge detection algorithm Canny operator, and the high threshold value and the low threshold value of the Canny operator are determined through a dynamic threshold value; interference edges are removed, namely, a sliding window filter is arranged to filter perpendicular and transverse straight lines in the images, a Sobel gradient operator is utilized to calculate the direction gradient of pixel points in the images, the direction angle of the pixel points is acquired through arc tangent, and then direction gradient filtering is conducted according to the size of the angle. In the lane line recognition step, a plurality of straight lines are detected through Hough transformation, and lane lines are determined according to the positions, where the straight lines are located, of the images and the slope; whether the determined lane lines meet requirements or not is judged according to the relations of the positions and the slope of the left lane line and the right lane line and the included angle between the left lane line and the right lane line. According to the method, lane departure warning anti-noise and anti-interference capacity is improved, high robustness is achieved, and detection efficiency is improved.