Interior Ministry spokesman Nasrat Rahimi said the operation was conducted on Monday evening.
Rahimi further added that the Special Forces freed 34 people including 7 army soldiers, 7 policemen and 3 intelligence operatives.
This comes as the Afghan Special Forces freed 13 prisoners from a Taliban prison in Kunduz province.
The Special Operations Corps said the Special Forces conducted the operation late last night.
The anti-government armed militants including Taliban have not commented regarding the operations so far.
Both Baghlan and Kunduz are among the relatively volatile provinces in North of Afghanistan where Taliban often conduct terrorist related activities.