Abstract Accurate estimation of photometric redshifts (photo-zs) is crucial for cosmological surveys. Various methods have been developed for this purpose, such as template fitting methods and machine learning techniques, each with its own applications, advantages, and limitations. In this study, we propose a new approach that utilizes a deep learning model based on Recurrent Neural Networks (RNN) with Long Short-Term Memory (LSTM) to predict photo-z. Unlike many existing machine learning models, our method requires only flux measurements from different observed filters as input. The model can automatically learn the complex relationships between the flux data across different wavelengths, eliminating the need for manually extracted or derived input features, thereby providing precise photo-z estimates. The effectiveness of our proposed model is evaluated using simulated data from the Chinese Space Station Telescope (CSST) sourced from the Hubble Space Telescope Advanced Camera for Surveys (HST-ACS) and the COSMOS catalog, considering anticipated instrument effects of the future CSST. Results from experiments demonstrate that our LSTM model, compared to commonly used template fitting and machine learning approaches, requires minimal input parameters and achieves high precision in photo-z estimation. For instance, when trained on the same dataset and provided only with photometric fluxes as input features, the proposed LSTM model yields one-third of the outliers fout observed with a Multi-Layer Perceptron Neural Network (MLP) model, while the normalized median absolute deviation $\rm \sigma _{NMAD}$ is only two-thirds that of the MLP model. This study presents a novel approach to accurately estimate photo-zs of galaxies using photometric data from large-scale survey projects.