The "Anchorman" star will play at five different spring training ballparks in Arizona, with 10 teams, as part of an HBO special from his comedy website, Funny Or Die, set to air later this year.
Ferrell will play all of the positions on the field over the course of the day, in honor of former major leaguer Bert Campaneris, who did so during a regular-season game in 1965.
Game-used memorabilia from Ferrell's day at the ballparks will be auctioned on MLB.com, with proceeds going to Cancer for College and Stand Up to Cancer.
Major League Baseball Commissioner Rob Manfred said in a statement, “Will is a big fan of our game, and many of us in baseball -- among our clubs, players and our millions of fans -- are big fans of his. Major League Baseball is happy to take part in what will surely be a fun and memorable day for a great cause.”
This is Ferrell's baseball schedule for Thursday (all times Pacific):