After writing the 1996 film Sunchaser, the 1998 film The Mighty and the 2001 film K-PAX, Leavitt was hired by Warner Bros. in February 2004 to rewrite an early draft of the film Blood Diamond, then titled Okavango. The story had been stuck in "development hell" at the studio for years before producers Paula Weinstein and Gillian Gorfil finally decided on the story of an African farmer caught up in the conflict between an American smuggler and the local diamond mining organization. Leavitt researched the diamond industry to great lengths before he began writing the screenplay, explaining that he has "always been a stickler for immersing [himself] in research". He wrote the film with the assumption that it would offend the diamond industry, particularly De Beers, and so made sure to portray the industry truthfully, aware that he could potentially be sued by De Beers and other powerful mining corporations. Paula Weinstein was impressed by Leavitt's Blood Diamond draft, but hired writers Ed Zwick and Marshall Herskovitz to rewrite the script again; by the time he had completed the script, Zwick had become so interested in the story that he agreed to direct the film as well. Leavitt was signed by Warner Bros. in October 2006 to adapt Vanity Fair editor Doug Stumpf's novel Confessions of a Wall Street Shoeshine Boy, which the studio had acquired the rights to in mid-2005. He has also since rewritten Scott Williams' original draft of The Express, a biographical film about American football player Ernie Davis. He wrote the screenplay for In the Heart of the Sea, for Intermedia and Spring Creek, and has written Animal Kingdom on spec. He re-wrote the 2014 film Seventh Son and the 2016 film Warcraft.