Celebrating its centennial anniversary, the Stern-Gerlach experiment has proven to be one of the cornerstones of quantum mechanics, unravelling the quantized nature of the spin angular momentum, and being used in various applications ranging from matter-wave interferometry to weak measurements. Here we report an analogous all-optical Stern-Gerlach experiment in nonlinear optics, where the frequency of light acts as a pseudospin. We observe the splitting of light into two beams, each comprising a frequency-bin superposition, in the presence of a nonlinear coupling gradient. We further realize the phase-sensitive deflection of a distinct frequency-bin superposition into a single direction. Our work constitutes a frequency-domain all-optical coherent deflection of light, offering large bandwidths, fast switching rates and tunability, which are valuable for both classical and quantum information. Furthermore, our findings serve as experimental proof of concept for the emulation of spin transport phenomena using nonlinear optics. An analogous all-optical Stern-Gerlach experiment is observed in nonlinear optics, where the frequency of light acts as a pseudospin. The deflection depends on the strength of the nonlinear coupling gradient as well as on the relative phase between the different input frequencies.