Matthew Devlin from Thornliebank undertook the challenge at Rouken Glen Park and in Glasgow on Friday, starting at midnight and finishing at 10.30pm.
Cerebral Palsy Scotland’s mission is to help people with cerebral palsy build skills, knowledge, confidence and relationships.
Matthew was supported by his friends and family and there were some emotional scenes when he crossed the line.
The former St Ninians High pupil, who will start training at university to be a paramedic in the autumn, said: “I decided to complete almost 2.5 marathons in under 24 hours for some amazing people with amazing families.
“Cerebral Palsy affects approximately one in every 500 births and is something that is very close to my heart.
“The support that Cerebral Palsy Scotland offers those with the condition can be life-changing as they provide a range of assessments and therapies that can make such a huge difference to the quality of life of the individual.”
Matthew set up a Just Giving with a target of £300, but be beat this 13 times over, receiving £4,191.69 from 259 supporters plus £662 in Gift Aid.
His dad Martin said: “Matthew had a modest target and he smashed it big time, an amazing effort for a brilliant charity.”
To make a donation visit www.justgiving.com/fundraising/matthew-devlin3.