Wake County Schools officials said Tuesday afternoon that debris in the heating system had caused the problem.
At about 8:45 a.m., school staff members smelled the odor near heating units in the school's cafeteria. Fire crews and PSNC Energy officials were called to the school and tested the air quality for carbon monoxide.
At one point, authorities said carbon monoxide levels were five times the limit health officials deem safe.
"We've had some minor headaches and throwing up," said Jackie Weathersby, a battalion chief with the Raleigh Fire Department. "As far as anything long-term, I don't see any problem."
Four teachers and one student were taken to WakeMed after complaining of headaches and nausea, authorities said.
As a precaution, the more than 500 students at the school were moved into the gymnasium, which is in a separate building.
"Our first concern was the kids," teacher Sue Moody said.
Nearly two hours later, officials later determined the school was safe for students, and classes were allowed to resume. Bag lunches were brought in from a neighboring school.
Despite the all-clear signal, scores of parents lined up in the rain to take their children home early.
"They just said there was an emergency situation at the school and they were evacuating. I'm just here to pick up my son," one man said.
"Some parents were pretty jittery when they came to pick up their kids," Moody said. "Some of the kids were upset, too, but as long as we try to stay calm and do it in a nice way and not chaotic, it makes it easier for everybody."
PSNC crews conducted tests on a gas line to the school, and school district maintenance crews tested the school's heating system.
The maintenance crews found debris had blocked an air intake system, district officials said. The debris was removed, and the heating system was working properly, officials said.
"Our school staff did a great job handling kids, keeping them calm and getting them to a place (where) they would be safe," district spokesman Bill Poston said.
Brentwood Elementary will hold classes on its regular schedule Wednesday, officials said.