The invention relates to an infectious disease prediction method and system based on a hidden Markov model, and a medium. The method comprises the following steps: S1, generating a meteorological and hydrological observation sequence and an infectious disease outbreak state sequence; S2, preprocessing the meteorological and hydrological observation sequence to generate a training sample set, and dividing samples in the training sample set into a plurality of sample feature intervals according to sample features; S3, calculating an observation probability matrix and an outbreak state transition probability matrix according to the sample features, the sample feature intervals and the infectious disease outbreak state sequence; S4, generating a hidden Markov model according to the meteorological and hydrological observation sequence, the infectious disease outbreak state sequence, the observation probability matrix, the outbreak state transition probability matrix and the initial state probability distribution; and S5, predicting a meteorological and hydrological sequence at a certain moment in the future according to the historical meteorological and hydrological observation sequence, and substituting the predicted meteorological and hydrological sequence into the hidden Markov model to predict the infectious disease outbreak state. The method has the characteristics of high calculation speed, high accuracy and easy acquisition of sample data.