The origin of the electronic nematicity in FeSe, which occurs below a tetragonal-to-orthorhombic structural transition temperature Ts ≈ 90 K, well above the superconducting transition temperature Tc = 9 K, is one of the most important unresolved puzzles in the study of iron-based superconductors. In both spin- and orbital-nematic models, the intrinsic magnetic excitations at Q1 = (1; 0) and Q2 = (0; 1) of twin-free FeSe are expected to behave differently below Ts. Although anisotropic spin fluctuations below 10 meV between Q1 and Q2 have been unambiguously observed by inelastic neutron scattering around Tc(<< Ts) , it remains unclear whether such an anisotropy also persists at higher energies and associates with the nematic transition Ts. Here we use resonant inelastic x-ray scattering (RIXS) to probe the high-energy magnetic excitations of uniaxial-strain detwinned FeSe. A prominent anisotropy between the magnetic excitations along the H and K directions is found to persist to ~ 200 meV, which is even more pronounced than the anisotropy of spin waves in BaFe2As2. This anisotropy decreases gradually with increasing temperature and finally vanishes at a temperature around the nematic transition temperature Ts. Our results reveal an unprecedented strong spin-excitation anisotropy with a large energy scale well above the dxz/dyz orbital splitting, suggesting that the nematic phase transition is primarily spin-driven. Moreover, the measured high-energy spin excitations are dispersive and underdamped, which can be understood from a localmoment perspective. Our findings provide the much-needed understanding of the mechanism for the nematicity of FeSe and points to a unified description of the correlation physics across seemingly distinct classes of Fe-based superconductors.