Stekelenburg leaves the beaten Italian Cup finalists after two years at the Stadio Olimpico.
The 30-year-old made his name at Ajax, spending the first nine years of his career in Amsterdam, where he came to the attention of Cottagers boss Martin Jol.
Stekelenburg was part of the Holland squad which reached the final of the last World Cup, and he also featured in last summer's European Championships.
Jol said: "Maarten Stekelenburg is a fine quality goalkeeper who I know well from my time working with him at Ajax and of course as the Dutch international goalkeeper I have always had an additional interest in his career.
"I am sure that he will do well here at Fulham in the Premier League.
"He is a player of great quality and technical ability whose distribution and ability to react quickly and read the game is exceptional; he will be a fantastic addition to the talented team of keepers that we already have.
"I am delighted that he was so keen to come to join us and am very happy with the way that the summer is shaping up in terms of our signings, so on the whole I'm ever so pleased."
Stekelenburg, who has 54 caps, said: "It's good that I'll be joining Martin again. He knows my capabilities very well, so I am just looking forward to joining up with the team in pre-season and enjoying some time with them prior to the new season starting.
"I am very happy to be joining Fulham and to have everything sorted out so early in the summer, so I can really focus on preparations for playing in the Barclays Premier League next season."