Ultrafast control of magnetic order by light provides a promising realization for spintronic devices beyond Moore’s Law and has stimulated intense research interest in recent years. Yet, despite 2 decades of debates, the key question of how the spin angular momentum flows on the femtosecond timescale remains open. The lack of direct first-principle methods and pictures for such process exacerbates the issue. Here, we unravel the laser-induced demagnetization mechanism of ferromagnetic semiconductor GaMnAs, using an efficient time-dependent density functional theory approach that enables the direct real-time snapshot of the demagnetization process. Our results show a clear spin-transfer trajectory from the localized Mn-d electrons to itinerant carriers within 20 fs, illustrating the dominant role of sp−d interaction. We find that the total spin of localized electrons and itinerant carriers is not conserved in the presence of spin-orbit coupling (SOC). Immediately after laser excitation, a growing percentage of spin-angular momentum is quickly transferred to the electron orbital via SOC in about 1 ps, then slowly to the lattice via electron–phonon coupling in a few picoseconds, responsible for the 2-stage process observed experimentally. The spin-relaxation time via SOC is about 300 fs for itinerant carriers and about 700 fs for Mn-d electrons. These results provide a quantum-mechanical microscopic picture for the long-standing questions regarding the channels and timescales of spin transfer, as well as the roles of different interactions underlying the GaMnAs demagnetization process.