Solitons attract a great deal of interest in many fields, ranging from optics to fluid mechanics, cosmology, particle physics and condensed matter. However, solitons of these very different types rarely coexist and interact with each other. Here we develop a system that hosts optical solitons coexisting with topological solitonic structures localized in the molecular alignment field of a soft birefringent medium. We experimentally demonstrate and theoretically explain optomechanical interactions between such optical and topological solitons, mediated by the local transfer of momentum between light and matter and the nonlocal orientational elasticity of the liquid-crystal phase used in our system. We show that the delicate balance arising from these different contributions to the optomechanical force enables facile dynamical control and spatial localization of topological solitons. Our findings reveal unusual solitonic tractor beams and emergent light–matter self-patterning phenomena that could aid in creating new breeds of nonlinear photonic materials and devices.