The cricket star and Take Me Out host will join motoring journalist and racing driver Chris Harris in the BBC Two show's main presenting line-up from next year.
Flintoff, also a captain on Sky One's A League Of Their Own panel show, said he was excited to be taking on the new role.
"It's not often you have the chance to do both of your dream jobs, but I'm now lucky enough to say I will have," he said.
"I've always been passionate about cars and I'm so excited to be joining the Top Gear team."
McGuinness said: "To be hosting a show I've watched and loved from being a small boy is beyond exciting. Top Gear fans worldwide are a passionate bunch and I consider myself one of them."
Friends star LeBlanc announced he was leaving the motoring show earlier this year, after four series, saying he wanted to spend more time with his friends and family.
He had joined the line-up in 2016, a surprise addition alongside Chris Evans following the departure of previous hosts Jeremy Clarkson, Richard Hammond and James May. He then continued to host after Evans quit following their first series.
LeBlanc's final shows will air early next year, with Flintoff and McGuinness due to start filming for the next series at around the same time.
The announcement has received a mixed reaction from fans.
Rory Reid, the show's previous co-presenter, will now host Top Gear's companion show, Extra Gear, along with Sabine Schmitz.
Patrick Holland, controller of BBC Two, said Flintoff and McGuinness would "bring a new energy and competitive spirit to Top Gear".
Harris, who has been a lead host on Top Gear since 2017, said of his new co-stars: "They're both brilliant, natural entertainers - and their mischief mixed with the most exciting cars on the planet is sure to take the show to the next level."
© Sky News 2018