The actor will reprise his role as Gwen Stacy's (Emma Stone) father Captain Stacy in the follow-up to the film.
Leary told Collider: "I guess they officially announced it yesterday.
"I don't know if I'm allowed to say. Every time you say something about this f**king movie, they go crazy!"
The Rescue Me star added that he preferred Batman to Spider-Man despite plans to appear in the rebooted franchise.
"I'm more of a Batman guy, but I have a good friend, Jeff Garlin, who is a Spider-Man freak, and he said to me, 'The first time I met you, I thought you were George Stacy!'," Leary explained.
"That was 30 years ago. He had an old comic book frame on his computer and he showed it to me, and I was like, 'You're sick!' and he was like, 'No, I'm a Spider-Man freak.' People take it very seriously."
Leary joined the cast for the first film in November.
The second film in the rebooted Spider-Man franchise will be released on May 2, 2014, Columbia Pictures announced this week.
Watch the trailer for The Amazing Spider-Man below: