Machine learning has been employed for the rapid and accurate prediction of gas leak dispersion. However, existing models require extensive high-precision numerical simulation datasets, which presents a significant computational challenge. This study proposes a novel method using transfer learning for real-time dispersion prediction of hazardous chemical leaks. A deep learning model is pre-trained using all samples of a specific chemical, followed by fine-tuning with a small subset of samples from another chemical. This process enables the transfer of dispersion models across different chemicals and achieves rapid prediction of dispersion consequences for various chemicals. Optimal model hyperparameters are determined through a genetic algorithm, while the optimal numbers of reused layers and training samples are explored through sensitivity analysis. The proposed transfer learning method significantly reduces numerical computations by 52–74% while maintaining high prediction accuracy. This approach can provide guidance for developing deep learning-based dispersion prediction models for hazardous chemical leaks and help with emergency response strategies.