Andrew McSorley, head of Glasgow's St Thomas Aquinas Secondary School, is following the Way of St James - the Camino de Santiago de Compostela - across Spain.
He will be joined on his epic trek by school chaplain Father Joe Lappin and every penny the men raise will be gifted to Mary's Meals.
Mr McSorley said: "This is a major physical challenge but if you've ever met our Chaplain, you'd agree that its a major inter-personal challenge too - 500 miles with Father Joe!
"It is going to be really gruelling and a lot of people have questioned my sanity over it but it's something I have wanted to do for years."
The Way of St James is an ancient pilgrimage route leading to Santiago de Compostela, in north-west Spain.
Tradition tells that the bones of the Apostle St James are buried there, compelling thousands of the faithful each year to walk the route.
The main path is the French route - Camino Frances - but the pair are travelling the more challenging Camino del Norte.
They will set off from San Sebastian in Spain, before walking through Guernica, Bilboa, Santander and Oviedo to arrive in Santiago de Compostela on the Feast of St James - July 25.
With just two rest days they must cover 20 miles a day for 25 days to cover the 500 mile route.
St Thomas Aquinas this year has Mary's Meals as its school charity.
The Scots charity runs school feeding programmes in some of the world's poorest areas where hunger and poverty prevent children going to school.
It currently reaches almost 800,000 children with a daily meal in their place of education in 16 countries
Mr McSorely added: "Some people take years to complete the walk, doing a little bit of it each year.
"I'm no walker and I wouldn't say I'm particularly fit, but as headteacher sometimes you have to step up.
"I have decided I'm going to do this so I'm just going to get on and do it.
"Knowing it is for a good cause will make things a little bit easier."
To donate see mydonate.bt.com/fundraisers/caminonortechallenge