2002–2013: Spider-Man and stardom
In 2002, Maguire starred as the title character in Spider-Man, based on the Marvel Comics superhero of the same name. The film was a major success and made him a star. His performance as Spider-Man earned him glowing reviews. Mark Caro of the Chicago Tribune wrote that, "with his big, round, soulful eyes, Maguire always has been able to convey a sense of wonder, and his instinct for understatement also serves him well here." That same year, he was credited as a producer on the film 25th Hour, and the next year, on Whatever We Do.
Maguire had a lead role as the jockey John M. "Red" Pollard in Seabiscuit (2003), based on Laura Hillenbrand's novel of the same name about the famous racehorse Seabiscuit. In addition to acting, he was also credited as an executive producer. In 2004, he reprised his role as Peter Parker in Spider-Man 2, which, like its predecessor, was a critical and commercial hit and is often considered to be one of the best superhero movies of all time. Due to the physical toll of filming Seabiscuit, Maguire was often absent from the set of Spider-Man 2; he was nearly fired and his role was offered to Jake Gyllenhaal. However, his girlfriend's father Ronald Meyer was able to help him secure the role. Maguire admitted his behavior toward the situation was "inappropriate" and that he learned his lesson. Gyllenhaal would later make his Spider-Man debut as Mysterio in 2019's Spider-Man: Far From Home. In 2006, Maguire starred in his first villainous role as Corporal Patrick Tully opposite George Clooney and Cate Blanchett in Steven Soderbergh's The Good German, based on the Joseph Kanon novel of the same name. He next played Spider-Man in Spider-Man 3 (2007). The film was a box office hit, but received mixed reviews, with critics praising the cast and visual effects but criticizing the overabundance of villains. Plans for Spider-Man 4 were set in order, but despite the proposed addition of characters like the Vulture and Black Cat (with John Malkovich and Anne Hathaway in talks to play them), the film was ultimately cancelled due to director Sam Raimi feeling creatively constrained, the poor reception to the previous film, and script and production complications. Sony's Columbia Pictures decided to reboot the franchise instead. The film, titled The Amazing Spider-Man, was released on July 3, 2012, to a strong box office performance and generally positive reviews, with Andrew Garfield playing Peter Parker. It was followed by a sequel, The Amazing Spider-Man 2 (2014), which received mixed reviews and had a mediocre box office performance. The series was cancelled due to these factors, as well as a desire to integrate Spider-Man into the Marvel Cinematic Universe.
In 2008, he made a cameo appearance in the action comedy film Tropic Thunder as a gay 18th century monk in love with Father O'Malley, played by Robert Downey Jr., in the faux trailer for Satan's Alley. He was a last-minute replacement in the role, and due to previously scheduled commitments was only available to be on set for two hours to film his scenes. Near the end of Tropic Thunder, it is revealed that Maguire's character has been nominated for the Academy Award for Best Actor for Satan's Alley, which he loses to Tugg Speedman (Ben Stiller) for his role in Tropic Blunder, presented by Kirk Lazarus.
In 2009, Maguire starred alongside Gyllenhaal and Natalie Portman in the Jim Sheridan-directed war drama Brothers as Sam Cahill, a prisoner of war who returns from Afghanistan and starts suspecting that his wife has become romantically involved with his brother. He received critical acclaim and a Golden Globe nomination for his performance in the film. Of the nomination, Maguire said, "I had no expectation about getting a nomination, but I was watching nonetheless. My wife and my son got really excited. I was sort of surprised – I was like, 'Oh, wow.' And I couldn't hear the latter part of my name." Maguire lost to Jeff Bridges for his role in Crazy Heart. Maguire was set to star as The Writer in Life of Pi (2012), directed by Ang Lee, but was cut from the film during production for being "too famous" compared to the rest of the cast. He was replaced by Rafe Spall, with whom Lee reshot the scenes that had already been shot with Maguire.
In 2012, Maguire was a co-producer of Good People. That same year, he also established his own production company, Material Pictures, which secured independent financing in 2013 to help it produce more feature films. Maguire and DiCaprio once again performed together in Baz Luhrmann's remake of The Great Gatsby (2013); DiCaprio played the title role, while Maguire played the story's narrator, Nick Carraway.