-- PHOENIX -- Will Ferrell plans to play ball in spring training -- and play ball and play ball and play ball.
The comedian plans to play every position while making appearances at five Arizona spring training games on Thursday. He will play for all 10 teams involved, HBO and Major League Baseball announced Wednesday.
The star of "Anchorman: The Legend of Ron Burgundy," "Talladega Nights: The Ballad of Ricky Bobby" and "Elf," among other movies, will travel to the Phoenix suburbs of Mesa, Tempe, Scottsdale, Glendale and Peoria via helicopter. The event will be filmed for an upcoming HBO special in conjunction with the Funny or Die website co-founded by Ferrell.
"This latest collaboration is one of those things only Will could pull off," Michael Lombardo, HBO's president for programming, said in a news release. "I can't wait to see him take the field."
HBO said Ferrell is dedicating his special to fighting cancer. He also will honor Bert Campaneris' feat of playing nine positions in a game five decades ago. Starting times for four of the games were adjusted to make Ferrell's barnstorming tour possible.
Memorabilia collected during Ferrell's tour will be auctioned off at MLB.com, with proceeds going to College of Cancer and Stand Up to Cancer, according to HBO.
"Will is a big fan of our game," MLB Commissioner Rob Manfred said in a statement, "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."
Ferrell is to appear in the following games: Seattle Mariners- Oakland Athletics to start at 12:05 p.m. PDT; Chicago Cubs- Los Angeles Angels at 1:10 p.m.; Cincinnati Reds- Arizona Diamondbacks at 2:10 p.m., San Francisco Giants- Chicago White Sox at 4:05 p.m.; and Los Angeles Dodgers- San Diego Padres at 6:15 p.m.
"We'll see if he falls into line," A's manager Bob Melvin joked to reporters Wednesday. "If he gives me any lip, we're going to have some trouble, obviously."
This is not Ferrell's first foray into the game.
In 2012, he and Zach Galifianakis, promoting their movie "The Campaign," threw out the first pitch at a Chicago Cubs game.
And in 2010, he pitched -- sort of -- for Houston's Triple-A club, the Round Rock Express, in a game against Nashville. Wearing a mustache in the guise of "Rojo Johnson," a temperamental Venezuelan player, he threw one pitch behind a batter and was ejected. He ripped off the mustache as he left the field.
"Nashville's got good stuff," he said afterward. "They've got a lot of moxie."
It gives a hint of what Major League Baseball is in for on Thursday.
Information from ESPN.com's Christina Kahrl and The Associated Press was used in this report.