The early detection of cancers increases the possibility of health recovery and prevents the disease from becoming a silent killer. This study introduces an effective method for identifying ovarian cancer (OC) using Elman Recurrent Neural Network (ERNN), which can recognize cancer via mass spectrometry data. The network has a topology of 100 input neurons for receiving data, five neurons for hidden and context layers, and two output nodes to indicate the status. The proposed method uses reduced-size features, including ion concentration levels at specific mass/charge values, which are trained using various learning algorithms to determine the suitable one that achieves the best results. The experimental results show that all the training algorithms achieve about 100% performance rate, with the Levenberg Marquardt (LM) being the most accurate and fastest algorithm, which converges after six epochs and achieves 0.0035, 0.0045 and 0.0045 mean square errors for training, validation, and test performances, respectively. Based on comparative results, the proposed LM-ERNN method outperforms other OC detection methods and holds promise for detecting other types of cancer.