Author Marcus Webb sued Stallone last October for copyright infringement, claiming that the script was "strikingly similar" to his own work.
Stallone denied the charges, and according to The Hollywood Reporter a judge ruled in favour of him yesterday (June 25), declaring the claims to be without merit.
Webb's script, entitled The Cordoba Caper, centred on "a team of elite, highly-trained mercenaries".
He claimed that Stallone and Expendables writer David Callaham could have had access to the script during the years it spent being shopped around Los Angeles.
Stallone's lawyers countered by stating that Callaham had already written the third draft of his screenplay by the time Webb completed his, and that Webb had no proof that either had seen the script for Cordoba.
The sequel to The Expendables will be released on August 17.
Watch a trailer for The Expendables 2 below: