The maritime industry is getting prepared for using ammonia as a fuel to meet the decarbonization goal. However, ammonia is toxic, corrosive, and flammable, which poses specific safety challenges during bunkering compared with conventional fuels.The corrosion can be prevented by selecting suitable materials. However, the impact of toxic gas dispersion and fire has high uncertainties, thus risk assessment should be conducted. Currently, there are insufficient risk assessment guidelines for ammonia bunkering available. Therefore, this paper proposes a Bayesian network (BN) based quantitative risk assessment framework to investigate the potential risks of ammonia in ship-to-ship bunkering considering the toxicity and flammability. The study validates the utility of the proposed framework and demonstrates the BN as an efficient model in performing the probabilities calculations and flexible in conducting causal diagnosis. The results show that toxicity has the greatest impact on the risks of ammonia bunkering compared with flammability. The main innovation of this work is realizing the efficient quantification of risks for ammonia ship-to-ship bunkering by using the BN.