According to Sahara Reporters, the girls were released in the early hours of Thursday, October 13.
More than 200 girls were abducted from their schools in Borno state in 2014 by the terrorists and while some of them had reportedly died, the rest remained held by the terror group.
Sources disclosed that the girls were picked up by military helicopter from Banki area of Borno state where Boko Haram militants dropped them off earlier on Thursday.
The release of the 21 girls came as President Buhari began a three-day trip to Germany to discuss assistance for the rebuilding of the northeastern part of Nigeria which has for years been ravaged by Boko Haram.
The names of the girls released were however not disclosed.
Naij said that the girls's release would be "cheering news not only for their parents but also for many Nigerians who day and night have prayed for their safe return".