The wife and children, who are British nationals, were in the country to care for sick relatives but were trapped by the Taliban's rapid advance.
But the headmistress of the Nottingham school the younger children attend got them registered for repatriation.
Their father said he was "so happy" when he got a call to confirm they had reached the allied controlled airport.
The group, who include the mother, her 24-year-old daughter, and her two youngest children - a five-year-old boy and a nine-year-old girl - are not being named for security reasons.
Taliban fighters had moved swiftly to take control of the country after the US and Nato forces withdrawal earlier in August and cut access to the airport.
Their father Raghib said: "For the past week we have been so worried about them, especially the kids
"We tried to get the visa for them but everywhere was closed.
"They kept calling me to say 'What do we do?', I was so worried."
Mellors Primary School head teacher Amanda Dawson described the situation as "the stuff of nightmares".
Speaking before the group made it to the airport, she said: "I've managed to get them registered for repatriation [on Wednesday].
"They're British citizens, so they were expected to be able to get safe passage through to the hotel and to the airport.
"Unfortunately the Taliban for the whole of yesterday were blocking off the entrance, so nobody could get through and another point in the day they blocked off the exit route.
"I had a voice message from [the youngest girl] who was really, really upset because the gunfire and the violence was really distressing her.
"She just said, 'miss miss help me, what can we do, there's shooting, it's dark, I'm getting really scared.'"
Raghib said: "The headteacher rang me crying to say they were at the airport, they are safe now.
"We are so happy."