Battery state of charge (SOC) estimation is crucial for assessing electric vehicle safety and evaluating the remaining driving range. Owing to the complexity, variability of operating conditions, and the highly nonlinear internal mechanisms of batteries, accurate SOC estimation remains a focal point of current research. Therefore, this paper proposes a random search optimization-based Long Short-Term Memory (RS-LSTM) neural network for precise SOC estimation. The paper firstly uses the CALCE dataset, extracting discharge capacity and discharge energy as critical features from six battery parameters by employing the random forest algorithm. The Look-back, Epoch, Batch size, and Learning rate parameters in the LSTM neural network optimized by random search algorithm. The study result reveals optimal settings (Look back: 45, Epoch: 177, Batch size: 64, Learning rate: 0.0026) achieving superior estimation accuracy, evidenced by mean average error(MAE) and root mean square error(RMSE)of 0.221 % and 0.262 %, respectively. Furthermore, the method's superiority, effectiveness, robustness, and applicability were verified by conducting tests across various estimation methods, various SOC estimation intervals, various temperature conditions, the addition of Gaussian noise, and tests on experimental and real-world vehicle data. The research process demonstrates that the proposed method has superior precision and indicates promising potential for future applications.