Lee, who is the co-creator of the Spider-Man comic, revealed the news on Twitter on January 9.
"It's been an exciting week for me, but I got a phone call last night that really flipped me out! I'm bustin' to tell you about it," wrote Lee. "My pal Avi Arad, producer of the new Spider-Man movie, called to tell me how excited he is about the film."
He continued: "Then came the surprise - Avi told me my cameo is all set for Spidey 4, and when he described it, I realised it's the best, most unusual one yet! I wish I could tell you what my cameo is, but that would kill the surprise. But I'll tell you this much - I'm finally in an action scene!"
Spider-Man is scheduled to open in theatres July 3, 2012.