The anomalous Hall effect in ferromagnets is a well-known phenomenon in which electromotive force is generated in the direction perpendicular to both the electric current and the magnetization. With nonmagnetic heavy metals, the generation of spin current by the spin Hall effect, as well as excitation of magnetization dynamics in an adjacent ferromagnet by spin-transfer torque, has been reported. However, the generation of a spin current in ferromagnets by the anomalous Hall effect has so far not been measured. Here we report the observation of spin current generation by the anomalous Hall effect through spin-transfer torque excitation in CoFeB/Cu/NiFe trilayer films. In this spin anomalous Hall effect, a spin current generated in the CoFeB by the anomalous Hall effect is injected into the NiFe and excites spin-transfer torque in the NiFe. This leads to a measurable modulation in the ferromagnetic resonance linewidth of the NiFe. The spin anomalous Hall angle in the CoFeB is estimated to be -0.14 ± 0.05, which is comparable to the spin Hall angle reported in heavy metals.