Dressed as superheroes, pirates, fairies and skeletons, the kids came in with their parents from Maryland, Virginia and Washington D.C., and lined up on the orange-lit White House driveway.
Standing outside the White House front door, the Obamas smiled, chatted and passed out cellophane goody bags that were also filled with a sweet dough butter cookie made by White House pastry chef Bill Yosses and a National Park Foundation Ranger activity book.
Mrs. Obama wore furry cat ears and a leopard-patterned top. Obama said the kids looked adorable, as well as his wife, "a very nice looking Catwoman."
A big, stuffed, black spider dangled in a web of string from the top of the portico, and pumpkins had sprouted up around the columns.
Meanwhile, an odd cast of figures wondered around the North Lawn, including skeletons playing musical instruments, walking trees and "Star Wars" characters. The night's arrangements took a month or two to prepare, the White House said.
The loot handed out was just part of the treat for the visiting kids, who were chosen with help from the Education Department.
"He touched my hand," said a beaming Tiera Thomas, 11, of Washington, D.C., after she picked up her candy from President Obama.
The Obamas spent about a half hour passing out candy to trick-or-treaters, ages 6 to 14.
Then they headed inside to the East Room, where the first couple attended a reception for military families and for the moms and dads who work at the White House, along with their kids.
Obama thanked the military members and their families. "We are so grateful to you," he said. "Especially now, a lot of the times, you guys are separated. It's tough. The spouses who are at home are serving just as much as folks who are deployed. So we are just so thrilled that you guys could be here."
The president, dressed in casual clothes, was one of the few not in costume. Even Obama's press secretary, Robert Gibbs, was dressed as Darth Vader, the "Star Wars" villain.
It was also the first White House Halloween for the Obamas' daughters, 8-year-old Sasha and 11-year-old Malia.
But the White House would not say what Sasha and Malia were wearing, even though hundreds of other children their ages were in costume in full view of the media. The White House referred back to the first lady's comment to Jay Leno, that finding out what Sasha and Malia were wearing would require "security clearance."
Over the years, the winter holidays have been the ones to get the full treatment at the White House, with Christmas trees and tinsel all around.
The Obamas are not the first, though, to show Halloween spirit. President George H.W. Bush and first lady Barbara Bush hosted 500 children on Halloween in 1989, loading them up with fun loot but also teaching them about the dangers of drugs. The kids came decked out in costumes; some Secret Service agents came dressed as clowns.
In the Clintons' first year in the White House, the Great Pumpkin returned. A huge orange jack-o'-lantern was formed around the front entrance to the White House, with the front door to the mansion serving as the middle tooth. The first couple's daughter, Chelsea, was 13 at the time and the house was stuffed with pumpkins.
Associated Press writers Ben Feller and Nancy Benac contributed to this story.
On the Net:
White House Historical Association on Halloween: http://tinyurl.com/ydeyhmw