John Wells, executive producer of "ER," "Third Watch" and "The West Wing," will take over for Sorkin for the show's fifth season this fall. Executive producer Thomas Schlamme -- who has won two Emmys for directing on "The West Wing" -- is also leaving the show after the current season.
"I had the best job in show business for four years and I'll never forget that," Sorkin said in a prepared statement.
Citing insiders, The Hollywood Reporter said Sorkin's decision was "complicated," and that Sorkin had been under pressure from NBC Entertainment President Jeff Zucker over concerns that the show had lost "its creative spark."
Zucker issued a statement jointly with Peter Roth of Warner Bros. Television, which produces the show.
"Aaron Sorkin and Tommy Schlamme have done an extraordinary job in their four years at the helm of 'The West Wing,'" said Zucker and Roth. "Aaron's brilliant writing and Tommy's gifted direction and leadership have been the cornerstones of 'The West Wing's' remarkable critical and ratings success."
The statement called the show "one of the finest shows to ever air on television."
Wells issued a statement calling Sorkin and Schlamme irreplaceable.
"Aaron's an exceptionally gifted writer and we're indebted to him for creating this wonderful world," said Wells. "Tommy's creative vision and his leadership have been central to the show's success."
NBC announced earlier this year that it had agreed to a deal with Warner Bros. Television to keep "The West Wing" on the air through the 2004-05 season.
"The West Wing" has been a critical success since its premiere in 1999, receiving 60 Emmy nominations and winning 25 Emmys -- including Best Drama Series in each of its first three seasons. The show won a record nine Emmys in its first season, followed by eight awards in each of the past two years.
But the show has had an uneven ratings performance for NBC. Most recently, it has turned in relatively weak numbers against such rival shows as "American Idol" on Fox and "The Bachelor" on ABC.
Interpol investigating stolen passports on missing flight
Jessica Simpson shares three-way kiss with friends in photo