A ransomware is the most hazardous kind of computer malware that causes a huge devastation to the computer systems, so that detecting it is highly required at the moment. Truthfully, several prior researchers addressed Markov Model and its variants, like Hidden Markov Model, to detect a malware, but none of them addressed the detection of ransomware through Assembly language instructions. In this paper, a new proactive approach for detecting ransomware based on Hidden Markov Model (HMM) is proposed in order to detect and classify ransomware. In addition, new datasets that comprises of various benign and ransomware are generated and collected. The proposed approach utilized Hidden Markov Model (HMM) for analyzing the generated and collected datasets from benign and ransomware samples, and it detected and classified all samples correctly with 73% accurate testing samples emissions sequence.(2)