Frequent collision accidents of ships in intersection waters have caused huge casualties and property losses. Unclear encounter intention, poor communication, or inaccurate judgment of the encounter intention are often the major causes of ships falling into dangerous and urgent situations, leading to collision accidents. There are few methods and models for automatically inferring ship encounter intention. In this study, an intelligent model driven by AIS data is proposed to infer the ship encounter intention in intersection waters. The Hidden Markov Model (HMM) is adopted to formulate the encounter process and perform intention inference. The encounter intentions, including crossing, overtaking and head-on, are modeled as unobservable states of the formulated HMM. The observable measures of HMM extracted from AIS data, include the relative distance, relative speed, and course difference between two ships. Subsequently, the Forward-Backward algorithm is employed to obtain the model parameters and the Viterbi algorithm is exploited to estimate the hidden state with the highest probability, resulting in the inferred intention. The main advantage of the proposed model is its ability to capture the spatial-temporal characteristics of the encounter process, that is, the spatial interaction between ships and the dynamic evolution of states of the encounter process. The AIS data collected from the Lantau Strait intersection waters are adopted to verify the effectiveness of the proposed model. The experimental results reveal that the model can achieve an inference accuracy of 95%, 91.33%, and 92.67% for crossing, overtaking, and head-on, respectively. Moreover, it has real-time performance that ensures the encounter intentions can be recognized at an early stage, which is very critical for the safe navigation of any ships encountered. Our results show that our model can infer the encounter intentions in a timely manner and with high accuracy.