Allen, 23, who won over audiences with his all-American good looks and by putting his personal spin on popular tunes, appeared shocked as Lambert, a 27-year-old musical theater actor, embraced him after host Ryan Seacrest's announcement.
"It feels good, but Adam deserves this,"Kris Allen said. "I don't even know what to feel right now, this is crazy."
A record high of nearly 100 million votes were cast in the finale. The "Idol" win guarantees Allen a recording contract.
A college student and devout Christian from Arkansas, Allen was the more clean-cut of the two finalists.
He often performed with his acoustic guitar, winning praise for rearranging well-known tunes, among them Michael Jackson's "Remember the Time" and Bill Withers' "Ain't No Sunshine."
As recently as last week, Kris Allen was considered a long shot heading into the battle for the top two "Idol" spots, but he wowed the show's judges with his rendition of Kanye West's "Heartless," ousting early favorite Danny Gokey.
Even hours after winning, Allen appeared stunned.
"I felt shocked almost every week that I made it," he told reporters. "To be the American Idol, I'm completely shocked."
Widely considered the frontrunner since early in the season, Lambert dazzled audiences and the show's celebrity judges with his off-the-charts vocal range and dramatic flair.
With his falsetto singing style, black nail polish and daring wardrobe, Lambert earned the nickname "Glambert." Entertainment Weekly magazine even dubbed him "The most exciting 'American Idol' contestant in years."
Backstage, Lambert appeared unfazed by the loss.
"For me it's not really about what happened tonight, it's about tomorrow," he said.
DARK HORSE
The low-key Allen was often called a dark horse in the competition. On Tuesday night's final performance show, "Idol" judge Simon Cowell admitted that he had doubted whether Allen actually belonged in the finale.
"When your name was announced last week I wasn't sure whether America had made the right choice," Cowell told Allen early in the show. "But I absolutely take all that back now."
Later in the night, Cowell appeared to all but anoint Lambert the winner, calling him a "worldwide star."
Highlights of Wednesday's star-studded finale included a joint performance between Lambert, Allen and surviving members of the rock band Queen. Also, judge Kara DioGuardi ripped off her dress to reveal a bikini in the middle of a singing duel with a former contestant famous for wearing a two-piece.
"American Idol" began as a cheesy summer talent show in 2002 but morphed into a cultural phenomenon that attracts tens of millions of viewers a week to News Corp's Fox network. Ratings have sagged about 7 percent this season, but it remains the nation's top-rated TV show with some 26 million viewers.
"American Idol" has produced true music stars from among its winners and losers, including Grammy winners Carrie Underwood, Kelly Clarkson and Jennifer Hudson, who also has won an Oscar.