The emergence of networking systems and quick deployment of applications cause huge increase in cybercrimes which involves various applications like phishing, hacking, and malware propagation. However, the Ransomware techniques utilize certain device which may lead to undesirable properties which might shrink the paying-victim pool. This paper devises a new method, namely Water Moth Flame optimization (WMFO) and deep recurrent neural network (Deep RNN) for determining Ransomware. Here, Deep RNN training is done with WMFO, and is developed by combining Moth Flame optimization (MFO) and Water wave optimization (WWO). Moreover, features are mined with opcodes and by finding term frequency-inverse document frequency (TF-IDF) amongst individual features. Moreover, Probabilistic Principal Component Analysis (PPCA) is adapted to choose significant features. These features are adapted in Deep RNN for classification, wherein the proposed WMFO is employed to produce optimum weights. The WMFO offered enhanced performance with elevated accuracy of 95.025%, sensitivity of 95%, and specificity of 96%.