Stellar flares can be accompanied by filament or prominence eruptions, which may lead to stellar coronal mass ejections (CMEs) that have significant impacts on surrounding exoplanets and stellar evolution. We report the capture of a filament eruption associated with an optical flare on the RS CVn-type star UX Ari. Based on high-resolution spectroscopic observations, we investigated the Doppler-shifted absorption features appeared in the H{alpha} flaring spectra, which can be indicative of a filament eruption. A huge optical flare was observed, which lasted for at least 150 hours and released an energy of about 1.47x10^37^erg in the H{alpha} line. The corresponding bolometric white-light energy is converted to be 1.03x10^39^erg, indicating that the flare is comparable to the most intense stellar superflares. A blueshifted absorption feature with a bulk velocity of -143.9km/s emerged in the H{alpha} line region during the initial phase of the flare, which then decelerated and turned into redshifted absorption. This suggests that a filament eruption happened and ultimately fell back toward the star, suggesting that it represents a failed filament eruption. The erupted filament mass of 8.5-15.0x10^20^g and the kinetic energy of 8.8-15.5x10^34^erg are derived. Furthermore, the relationship between the filament eruption and the flare is likely characterized by a sympathetic eruption.