The film is a combined sequel to and soft reboot of the 2016 DC Comics adaptation Suicide Squad, and sees a roster of supervillains team up to form an Avengers-esque supergroup.
Gunn, who is best known for directing Marvel’s Guardians of the Galaxy, posted a picture of himself and Stallone on Instagram.
Beside the image, he wrote: “Always love working with my friend @officialslystallone & our work today on #TheSuicideSquad was no exception.
“Despite Sly being an iconic movie star, most people still don’t have any idea what an amazing actor this guy is.”
The Rocky star then also confirmed the news on his own Instagram page, sharing a photo of a news outlet reporting his casting, along with the message: “Working with this incredible Director on this astounding project has made this an amazing year. I am a very lucky man to be surrounded by such talent.”