The match was in memory of the late Falkirk defender, Craig Gowans, 17, who died in 2005.
Guinness World Records are expected to approve the record set by the Craig Gowans Memorial Fund World Record Breaking Football Match within days.
The final score at Ainslie Park, at 22:00 on Wednesday, was 774-707.
The match started on Saturday at 13:00.
The previous record was 102 hours.
Craig Gowans was killed when training equipment he was carrying connected with an overhead power cable at the Little Kerse ground in Grangemouth.
The Craig Gowans Memorial Fund for The Sick Kids Friends Foundation has so far raised almost Â£80,000.
The match was played using seven substitutes on each side. There were no limits on how many times a substitute was used.
Every 12 hours a player clocked up on the pitch gave them one hour off from the match to have a shower or get food.
Eoghan Molloy, a member of the Craig Gowans Memorial Fund organising committee, said: "The whole experience has been an emotional rollercoaster from start to finish.
"There were a lot of mixed emotions as the final whistle blew - from relief and tiredness to joy, happiness and everything in between. It was amazing to hear that final whistle and to finish what we set to achieve.
"I'd like to extend a huge thank you to all of the supporters and volunteers who came down to support us across the four days.
"Playing throughout the night was by far the most difficult part of the challenge, but when the sun came up and the crowd returned this completely lifted our spirits. Being able to finish the match is all down to these supporters."
Roslyn Neely, chief executive of the Sick Kids Friends Foundation, said: "All of the participants of the Craig Gowans Memorial Fund have done a tremendous job in completely this outstanding challenge and we feel extremely privileged to be the beneficiary of their efforts. "
The money raised will be used to fund enhancements to the new Sick Kids hospital at the Royal Infirmary of Edinburgh at Little France, specifically a state-of-the-art Snoezelen room in Craig's name.
The space will be a calming room with multi-sensory equipment providing a relaxing and stimulating space for children with sensory impairments.
The previous world record was set at St Mary's, the home of Southampton FC, in June by two squads representing the Testlands Support Project, a Southampton charity.
Doug Henderson, chairman of Falkirk FC, said: "I'd like to congratulate the team for their great efforts over a monumental 105 hours, and to thank them also for getting together to deliver this wonderful tribute to Craig Gowans.
"Craig was an upstanding young man with a great future ahead of him, he had enormous promise as a footballer and was a big part of our Falkirk family. We all miss him so much."
A world record breaking attempt for the longest 11-a-side match has finished following 105 hours of football in Edinburgh.