Aiming to meet the growing need for automated harvesting, an automatic alignment method based on Euclidean clustering and K-means clustering is proposed to address issues of driver fatigue and inaccurate driving in manually operated corn harvesters. Initially, the corn field environment is scanned using LiDAR to obtain point cloud data, which are then subjected to pass-through filtering and statistical filtering to remove noise and non-corn contour points. Subsequently, Euclidean clustering and K-means clustering methods are applied to the filtered point cloud data. To validate the impact of Euclidean clustering on subsequent clustering, two separate treatments of the obtained point cloud data were conducted during experimental validation: the first used the K-means clustering algorithm directly, while the second involved performing Euclidean clustering followed by K-means clustering. The results demonstrate that the combined method of Euclidean clustering and K-means clustering achieved a success rate of 81.5%, representing a 26.5% improvement over traditional K-means clustering. Additionally, the Rand index increased by 0.575, while accuracy improved by 57% and recall increased by 61%.