Parking in narrow spaces presents significant challenges, often resulting in deviations between vehicle’s final parking state (FPS) and normal FPS. These deviations can cause partial intrusion into the target parking spots, increasing the risk of collisions in the parking process and potentially making the parking spots unusable. To address these issues, this paper proposes an optimization method for both the parking path and FPS in narrow and non-ideal vertical parking scenarios. Initially, a partition-based calculation method for the minimum distance between the vehicle and obstacles (DBVO) was developed to quantitatively assess the impact of intrusion on parking safety. Following this, a predefined geometric set of clothoids is used to smooth curvature discontinuities in the parking path, and a four-phase parking path pattern is devised. Subsequently, a preferred method for parking manners is proposed by analyzing the effects of parking direction and maneuvers on spatial requirements. Finally, a two-step parking path optimization method is presented with the framework integrating both online and offline calculations, using the minimum DBVO field and a predefined path pattern. Comparative experiments demonstrate that this method could enhance the proportion of available intrusion scenarios, increase the success rate of effective path acquisition, and improve the overall quality of parking paths.