The detection of anomalous behavior in video surveillance is a focus of present research which has huge value and extensive application probabilities. Due to the difficulty of human movement and the feasibility of environments, anomalous behavior detection has some challenges. This paper proposed a deep learning-based approach for detecting the weapon and anomalous behavior. The Residual Attention-based Long-Short Term Memory (LSTM) with Self Gated Rectified Linear Unit (SGReLU) is proposed to enhance the detection accuracy. The median filter is used for preprocessing which removes noise from the UCF-Crime dataset and feeds into Histogram of Oriented Gradients (HOG) for feature extraction. Then, the Reverse Learning Chimp Optimization Algorithm (RL-COA) is utilized for hyperparameter optimization which attains the individual's reverse solution and then preserves the individual with high fitness values. At last, the Residual Attention-based LSTM with SGReLU is utilized for the classification process. This model overcomes neuron dead issues by allowing negative values for some neurons and minimizing the probability of inactive neurons. The proposed model attained better results on UCF-Crime dataset through the metrics like accuracy, precision, recall, f1-score and AUC values of about 98.84%, 98.62%, 98.47%, 98.35% and 98.21% correspondingly that ensures accurate detection when compared to existing techniques such as ResNet18 with Simple Recurrent Unit (SRU), Residual attention-based LSTM and Convolutional LSTM.