The deal comes after Sony's Amazing Spider-Man 2 under-performed at the box office last year.
Despite a respectable $709 million box office haul, it was the lowest-grossing of Sony's five Spider-Man films so far.
The character could now appear in Marvel films such as Iron Man and Thor.
However, the timing of the deal makes it likely his first outing will be in 2016's Captain America: Civil War. The character already appears in the comic book version of the story.
Marvel will then co-produce the next solo Spider-Man outing, financed by Sony Pictures, which will be released in 2017.
Kevin Feige, the Marvel boss who has overseen 10 consecutive box office blockbusters, including Avengers Assemble and Guardians of the Galaxy, will be involved in all future creative decisions about Spider-Man.
He will work alongside Amy Pascal, the Sony executive who recently stood down following a cyber-attack that saw her private emails leaked.
Fans have been clamouring for Spider-Man to join Marvel's roster on the big screen for more than a decade.
Spider-Man has teamed up with Marvel's other superheroes in print
The character is part of the Marvel's comic book empire, but Sony has owned the film rights since 1999, when it paid a reported $7 million.
Evil Dead director Sam Raimi first brought the character to the big screen, with Tobey Maguire in the lead role.
More recently, the series was rebooted, with British actor Andrew Garfield inside the iconic red and blue suit and Marc Webb directing.
But the new deal effectively spells the end for Garfield's portrayal of Peter Parker and his superhero alter-ego, reported the LA Times.
Sony had been casting around for ways to re-invigorate the franchise after his second outing failed to break the $1 billion mark at the box office last May.
A third Amazing Spider-Man film was postponed to 2018, while a spin-off film, The Sinister Six, focusing on Spider-Man's most notorious enemies, was slated for 2016.
There was also discussion of introducing a female set of heroes in their own films; and a potential film based around Peter Parker's Aunt May.