A flipped puck was used to determine who got the first pick and Team Chara won the toss.
"I'm very appreciative to be taken first," said Datsyuk. "It was kind of a surprise, actually."
"I'm really happy that I could join my fellow Swedes on this team," said Karlsson.
Forward Evgeni Malkin of Pittsburgh, the current points leader, was taken by Chara in the third round while Alfredsson countered with Los Angeles goaltender Jonathan Quick, who leads the NHL with six shutouts.
Forward Marian Hossa of Chicago and defenseman Kimmo Timmonen of Philadelphia rounded out the top five picks by Chara and forward Claude Giroux from Philadelphia and Pittsburgh defenseman Kris Letang were the fourth and fifth picks for Alfredsson's team.
Team Chara's next five picks were forward Corey Perry of Anaheim, goaltender Carey Price from Montreal, Toronto forward Phil Kessel, defenseman Ryan Suter from Nashville and goaltender Jimmy Howard from Detroit.
The next five picks for Team Alfredsson were forward Steven Stamkos of Tampa Bay, St. Louis goaltender Brian Elliott, defenseman Shea Weber from Nashville, Vancouver forward Daniel Sedin and New York Rangers forward Dan Girardi.
For the Nos. 11-15 picks, Chara took Florida defenseman Brian Campbell, Chicago forward Patrick Kane, Toronto defender Dion Phaneuf, Calgary forward Jarome Iginla, who scored his 500th goal earlier in the month, and defenseman Dennis Wideman from Washington.
Alfredsson took Phoenix defenseman Keith Yandle, Ottawa forward Milan Michalek, Vancouver forward Henrik Sedin, Pittsburgh forward James Neal and Vancouver defenseman Alexander Edler for his 11-15 picks.
Forwards Marian Gaborik of the Rangers, Jordan Eberle from Edmonton and Tyler Seguin from Boston went to Chara with the next three picks while forwards John Tavares of the Islanders, Scott Hartnell from Philly and Jason Pominville from Buffalo went to Alfredsson.
The last two selections saw Dallas forward Jamie Benn -- who had an appendectomy on January 15 but will appear in his first All-Star game -- go to Team Chara while forward Logan Couture from San Jose was picked by Alfredsson with the last pick of the draft.
"Being the young guy and with these great players, I knew it was a possibility," said Couture.
Also named on Thursday were the rookie teams.
The representatives for Team Chara's freshman class are forwards Gabriel Landeskog of Colorado, Ryan Johansen of Columbus, Cody Hodgson of Vancouver, Colin Greening of Ottawa and Luke Adam from Buffalo, defenseman Raphael Diaz of Montreal.
Team Alfredsson's rookies are forwards Sean Couturier and Matt Read of Philadelphia, Carl Hagelin of the Rangers, Nick Johnson of Minnesota and Craig Smith of Nashville and defenseman Justin Faulk from Carolina.