He beat out his fellow finalist David Archuleta for the honor.
"I am absolutely at a loss for words," Cook said, tearing up as he learned the news. "This is amazing. Thank you."
The show's two-hour Season 7 finale featured performances by the finalists, the season's castoffs and recording stars Bryan Adams, Donna Summer, ZZ Top, George Michael, Graham Nash, OneRepublic, Carrie Underwood and the Jonas Brothers.
Jimmy Kimmel stopped by to poke fun of host Ryan Seacrest and judges Paula Abdul, Randy Jackson and Simon Cowell, while actors Robert Downey Jr., Ben Stiller and Jack Black acted as backup singers in a virtual performance of "Midnight Train to Georgia" with Gladys Knight.
More than 97.5 million votes were cast for the finale, Usmagazine.com said.
Seacrest said on the show that Cook won by 12 million votes.
Dennis Rodman pledges to end trips to North Korea
Senate Democrats to pull all-nighter on climate change