The group has recently stepped up attacks in the region, and its leader released a video last month threatening to kidnap girls from schools.
Dozens of gunmen stormed the Government Girls Secondary School in Chibok, about 130 km (81 miles) west of Maiduguri, on Monday night as the students slept in their dormitories, officials said. They engaged the soldiers guarding the school in a lengthy gun battle and then herded the girls onto vehicles.
"Many girls were abducted by the rampaging gunmen who stormed the school in a convoy of vehicles," said Emmanuel Sam, an education official in Chibok.
Boko Haram 'increasingly monstrous'
Islamists blamed for school attack
Sam could not say exactly how many girls were kidnapped, but one student who managed to get away said at least 200 students were taken.
"The Boko Haram attackers came to town around 9 p.m. and made straight for the school where they had a gun battle with soldiers stationed at the school and killed two soldiers," said Chibok resident Maina Babagana.
The gunmen then burned homes and businesses in the town in Borno state as they fled with the girls, witnesses said.
A military spokesman in the region declined to comment on the abduction, saying the Nigerian Defence Ministry would issue statement later.
A student who was among about a dozen girls who managed to escape from their abductors recounted her ordeal.
"They forced us into trucks, buses and vans, some of which were carrying food stuffs and petrol. They left with us in a convoy into the bush," said the student, who declined to be named for security reasons. "A group of motorcyclists flanked the convoy to ensure none of us escaped."
At one point, one of the trucks broke down and the girls on that vehicle were transferred to another one, the student said. The broken down truck was set on fire, she added.
When another vehicle broke down and the men tried to fix it, "some of us jumped out of the vehicles and ran into the bush. We later found our way back to Chibok," she said.
Boko Haram, which translates as "western education is sin," is known to have carried out deadly attacks on other schools in the northeast. In a clip released by the group March 23, leader Abubakar Shekau threatened to launch raids and abduct girls from schools.
In early March, Borno state government closed all of its 85 secondary schools and sent more than 120,000 students home following increasing Boko Haram attacks on schools.