The American team had already decided to usher Grosjean and Kevin Magnussen out the door, with F1 test driver and successful F2 racer Mazepin now confirmed as one of their new drivers. Mick Schumacher, son of the tragic seven-time champion Michael Schumacher, is tipped to be their other driver.
"Becoming a Formula 1 driver is a lifelong dream come true for me," said Mazepin, who lies third in the F2 standings.
Mazepin has a controversial past. Four years ago, eyewitnesses claimed Mazepin hit British rival Callum Ilott during an F3 race altercation. Ilott suffered cuts and a swollen jaw, but Mazepin received a very light ban.
Haas are ninth in the constructors championship and the team is desperately seeking a change of fortunes.
Grosjean's F1 career is expected to come to an end and he has already talked about driving a new Peugeot car in the endurance championship, which includes the historic Le Mans 24 hour race, from 2022.
He has been with Haas since its F1 debut in 2016 but team boss Guenther Steiner said the French driver had been difficult to manage.
"Romain can be very challenging at moments but when you get him on the right day and the right time he was a very big asset to the team and I think we have to thank him as well what he did for us," he said.
Grosjean said: "I think I've brought to the team a fair bit.
"I've had moments, yes, I've made mistakes but who doesn't? I think also when you have a poor car you need to try to drive to 105% to get anything good and when you drive to the level there are high chances you're going to go mistakes."