Hail disaster prediction is a pivotal research topic within the field of meteorology, carrying substantial importance for the prevention and mitigation of disasters. The complex terrain and frequent occurrence of hail in Qinghai Province present challenges for traditional prediction methods, which are hindered by issues such as sample imbalance and geographic complexity, resulting in less than ideal outcomes. This study, based on ERA5 reanalysis data and ground-based observation records, proposes a LightGBM hail prediction model that integrates Bayesian optimization with a dual-output header (DOH) structure. First, the DOH structure is developed to separately optimize positive and negative samples, effectively mitigating the sample imbalance problem. Additionally, a Bayesian optimization strategy is applied to conduct global hyperparameter tuning, thereby improving model performance. Experimental results show that, compared to mainstream single and ensemble classification methods, the proposed model achieves superior accuracy, precision, and recall. In the test set, the model demonstrated a prediction accuracy of 0.97, a recall of 0.939, a precision of 0.966, a critical success index (CSI) of 0.909, and a false alarm rate (FAR) of only 0.015. This research provides an effective technical solution for hail prediction in the Qinghai region, offering significant practical value for enhancing early warning capabilities.