The Moscow-born driver will make his full race debut with the American team in what will be an all-new driver line-up for Haas, with Romain Grosjean and Kevin Magnussen both exiting at the end of 2020.
Mazepin currently sits third overall in the Formula 2 driver standings, having claimed feature race wins at Silverstone and Mugello.
The 21-year-old also has four additional podiums and two fastest race laps in his 2020 campaign.
Mazepin, who currently drivers for Hitech Grand Prix in F2, will contest next weekend's season finale in Bahrain before making the leap to F1.
He will become the fourth Russian driver to race in F1, following on from Vitaly Petrov, Daniil Kvyat and Sergey Sirotkin.
“Becoming a Formula 1 driver is a lifelong dream come true for me,” Mazepin said.
“I really appreciate the trust being put in me by Gene Haas, Guenther Steiner, and the whole of the team. They're giving a young driver an opportunity and I thank them for that.
“I'm looking forward to starting our relationship together, both on and off the track, and I'm naturally keen to continue to demonstrate my abilities after a strong Formula 2 season.
“The team will be looking to me for feedback and inputs in order to refine its package for 2021 and beyond. I will take that responsibility on and can't wait to get started.”
Mazepin made the jump from karts to cars in 2015, with a Formula Renault 2.0 NEC stint followed by two seasons in the Formula 3 European Championship.
He finished runner-up in the 2018 GP3 Series in a strong season which featured four victories, paving the way to an F2 seat in 2019.
Steiner, Haas Team Principal, said he was delighted to have Mazepin onboard for 2021.
“Nikita has underlined his credentials in Formula 2 this year with a brace of victories and a handful of podiums in what's been a strong sophomore season for him,” Steiner said.
“He's developed into a mature racer moving up through the junior ranks – notably most recently in the GP3 Series, where he finished runner-up in 2018, and obviously in Formula 2 over the past two seasons.
“I'm excited to see what Nikita can achieve in Formula 1 and we look forward to giving him the opportunity to compete at the highest level of world motorsport.
“With a record-setting 23 race schedule set for the 2021 FIA Formula 1 World Championship, he's going to get plenty of track action to learn all the nuances of grand prix racing.”
Current F2 series leader Mick Schumacher is expected to fill the second Haas seat for next season.