Actor Chiwetel Ejiofor has stepped in to replace Don Cheadle in a new film about a real-life British drug trafficker who spent years imprisoned in Bolivia.

The 12 Years A Slave star will portray Thomas MCFadden in the film adaptation of the convict's 2003 book Marching Powder: A True Story of Friendship, Cocaine, and South America's Strangest Jail.

The story details his experiences during his time in the San Pedro Prison in La Paz, Bolivia, where he ran prison tours and befriended Australian journalist and book co-author Rusty Young, according to Deadline.com.

Marching Powder was originally scheduled to be made in 2008, with Cheadle attached to star and produce alongside Brad Pitt, but the project fell apart.