Accurate fault detection in high-voltage direct current (HVDC) transmission lines plays a pivotal role in enhancing operational efficiency, reducing costs, and ensuring grid reliability. This research aims to develop a cost-effective and high-performance fault detection solution for HVDC systems. The primary objective is to accurately identify and localize faults within the power system. In pursuit of this goal, the paper presents a comparative analysis of current and voltage characteristics between the rectifier and inverter sides of the HVDC transmission system and their associated alternating current (AC) counterparts under various fault conditions. Voltage and current features are extracted and optimized using a metaheuristic approach, specifically Harris Hawk’s optimization method. Leveraging machine learning (ML) and artificial neural networks (ANN), this technique demonstrates its effectiveness in generating a fault locator with exceptional accuracy. With a substantial volume of data employed for learning and training, the Harris Hawks optimization method exhibits faster convergence compared to other metaheuristic methods examined in this study. The research findings are applied to simulate diverse fault types and unknown fault locations at multiple system points. Evaluating the fault detection system’s effectiveness, quantified through metrics such as specificity, accuracy, F1 score, and sensitivity, yields remarkable results, with percentages of 99.01%, 98.69%, 98.64%, and 98.67%, respectively. This research underscores the critical role of accurate fault detection in HVDC systems, offering valuable insights into optimizing grid performance and reliability.