To improve the energy efficiency of ships and reduce greenhouse gas (GHG) emissions, the implementation of energy-efficient operation measures is particularly important. Driven by this, this study was dedicated to improving the accuracy of ship fuel oil consumption (FOC) prediction and laying the foundation for optimizing energy-efficient operations. Firstly, we combined voyage reports and meteorological data and constructed six datasets containing different features. These features comprise navigation-related features encompassing sailing speed, displacement and trim, as well as meteorological features encompassing wind, wave, sea current, sea water salinity and sea water temperature. Secondly, we conducted experiments with 14 popular ML models on the datasets and compared the prediction performance of different models by a new scoring system. Finally, we explored the advantages and disadvantages of each dataset based on the model performance scoring results and analyzed the effects of related meteorological factors on FOC during navigation. The key findings of the proposed work were that extra trees (ET), random forest (RF), XGBoost, and LightGBM had good fitting and generalization performance. Set5, the dataset containing the most complete meteorological data, achieved the best prediction results. In particular, it had an R2 (test) of 0.9317 on the ET model, which was 1.97% higher than the R2 (test) of the dataset using only voyage reports. The conclusions can assist shipping companies in constructing a ship FOC prediction framework and developing ship fuel-saving strategies.