Solar flares are often accompanied by filament/prominence eruptions (~10 4 K and ~10 10−11 cm −3), sometimes leading to coronal mass ejections that directly affect the Earth’s environment 1,2. ‘Superflares’ are found on some active solar-type (G-type main-sequence) stars 3–5, but the filament eruption–coronal mass ejection association has not been established. Here we show that our optical spectroscopic observation of the young solar-type star EK Draconis reveals evidence for a stellar filament eruption associated with a superflare. This superflare emitted a radiated energy of 2.0 × 10 33 erg, and a blueshifted hydrogen absorption component with a high velocity of −510 km s −1 was observed shortly afterwards. The temporal changes in the spectra strongly resemble those of solar filament eruptions. Comparing this eruption with solar filament eruptions in terms of the length scale and velocity strongly suggests that a stellar coronal mass ejection occurred. The erupted filament mass of 1.1 × 10 18 g is ten times larger than those of the largest solar coronal mass ejections. The massive filament eruption and an associated coronal mass ejection provide the opportunity to evaluate how they affect the environment of young exoplanets/the young Earth 6 and stellar mass/angular momentum evolution 7.