Active fault-tolerant systems are crucial for ensuring the reliability and safety of spacecraft attitude control, especially when dealing with actuator faults that could jeopardize mission success. This paper introduces a comprehensive framework for fault detection and identification (FDI) and fault-tolerant control (FTC) tailored to meet stringent real-time processing requirements and limited onboard resources. We propose a neural network-based fault identification approach, termed FaultNet, which leverages LSTM architectures to achieve millisecond-level inference (≈ 3ms). Compared to traditional observer-based FDI methods with multi-second convergence times, FaultNet offers a lightweight solution (model size ≈ 550KB) suitable for onboard deployment, delivering rapid and precise fault estimation. It enables accurate identification of both constant and time-varying faults, including effectiveness loss and additive bias. For fault-tolerant attitude control in spacecraft, we develop a reinforcement learning (RL)-based controller, incorporating carefully designed state representations and reward functions to ensure robust performance. The proposed framework is rigorously evaluated across four customized fault scenarios-including both constant and time-varying faults-and achieves rapid convergence (average attitude alignment within 20 seconds) and sustained stability (average convergence duration exceeding 280 seconds). The controller effectively compensates for actuator faults, maintaining high control precision with minimal attitude oscillation and consistent recovery performance. Simulation outcomes validate the neural network-based FDI's efficiency and accuracy, as well as the RL-based FTC's reliability, showcasing minimal fault estimation errors and consistent fault recovery performance. The source code and associated data are available at https: //github.com/LUWENL/fault-tolerant-control. © 2025 Elsevier B.V., All rights reserved.