The Internet of Vehicles (IoV) represents a specialized application of the Internet of Things (IoT), enabling vehicles to communicate with their surrounding infrastructure to enhance transportation safety and efficiency. However, IoV systems are susceptible to various cyberattacks, including Denial of Service (DoS) and spoofing attacks, which necessitate effective and efficient detection mechanisms. This study investigates the enhancement of detection efficiency for DoS and spoofing attacks in IoV by employing Ensemble Learning methods combined with feature selection techniques. The selected feature selection methods include Information Gain Ratio, Chi-Square (X²), and Fast Correlation-Based Filter (FCBF). The CICIoV2024 dataset, utilized in this study, was balanced using the Random Under Sampling technique to address data imbalance issues. The ensemble algorithms evaluated in this research comprise Random Forest, Gradient Boosting, and XGBoost. Results indicate that all three algorithms achieved high accuracy and F1 scores, reaching 0.985. Moreover, the application of feature selection significantly reduced computational time without compromising detection performance. These findings are expected to contribute to the advancement of IoV security systems in the future.