Morgan Freeman is on board to star in historical horse story “Beautiful Jim Key” with Robert Rodat making his directorial debut.

Cargo Entertainment is handling international sales at Cannes and financing along with Two Ton Films.

The Mark Gordon Company and Revelations Entertainment will produce with production slated to start early next year.

The story, based on the book of the same name by Mim Eichler Rivas, centers on the showman Dr. William Key and his performing horse, Beautiful Jim Key. His promoters claimed the “world’s smartest horse” could read, write and do math.

Key, a former slave, was relegated to carnivals so he recruited a one-time promoter for P.T. Barnum to be his front man — leading to the horse becoming a national sensation at the 1904 St. Louis Exposition.

The project marks the third collaboration for Gordon and Rodat following “The Patriot” and “Saving Private Ryan.”

Producers are Mark Gordon, Revelations Entertainment’s Lori McCreary, Cargo Entertainment’s Marina Grasic and Rogers Hartmann. Executive producers include  Clay Pecorin  and Russell Geyser from Two Ton Films and Michele Wolkoff from The Mark Gordon Company.

“Bob and I have had a long and fruitful collaboration over the years and I am so excited to be working with him on his directorial debut,” Gordon said.

CAA is packaging and representing the film along with The Gersh Agency for the US market.

CAA represents Revelations and Freeman. Rodat is repped by Gersh.