Jerry Bruckheimer's big-budget adaptation of Ubisoft's hit fantasy title Prince Of Persia: Sands Of Time, will also star Gemma Arterton as the female lead.
She will also appear in the James Bond outing Quantum of Solace, due for release in November.
Production on the Prince of Persia movie begins starts in July in Morocco and London, and is due for release in cinemas next summer.
Gyllenhaal will play Dastan, a prince in sixth-century Persia who must join forces with exotic princess Tamina (Arterton) to prevent a villains from possessing the Sands of Time – a gift from the gods that can reverse time and allow its possessor to rule the world.
"He's a wonderful actor," Bruckheimer said of Gyllenhaal. "He's someone I've been watching for a long time and somebody I've always wanted to work with."