The Nigerian government say the release comes after negotiations with the extremist group.
276 schoolgirls aged 16-18 were taken from a school in Chibok in Nigeria in April 2014. Some managed to escape but 219 were still missing.
Boko Haram took the girls because they are against children - especially girls - getting an education, like they do in the UK.
At the time they were taken people all over the world who were shocked by the story and they started a campaign called "bring back our girls".
Up until now, only one girl had been found: 19-year-old Amina Ali Nkeki was rescued in May.
The 21 schoolgirls have been taken to an army base by the International Committee of the Red Cross.
Twenty-one of the schoolgirls kidnapped by Boko Haram in Nigeria, Africa have been freed, according to the country's President.