Shearer, who captained the Match of the Day team, beat Savage, who led the BBC 5 live team with 547 goals to 529.
More than 1,100 people played in the snow and rain outside BBC MediaCityUK in Salford since 09:15 on Thursday, raising £370,592 for Sport Relief.
All-time Premier League top goal-scorer Shearer was presented his winning trophy by Gary Lineker.
After scoring in extra time of the last game, Shearer said the challenge had tired him out.
"My back, my thighs, my knees - they're all in bits but it was all worth it."
Look back at coverage of Sport Relief's Battle of the Five-A-Sides
Ex-Wales player Savage said it had been "challenging but amazing".
He said: "I'm very proud of 'Team Savage', there were times when I was sure we'd be taking that trophy home.
"Thanks to everyone for their amazing support which is what Sport Relief is all about, getting together to raise some cash and feel proud."
Lineker came out earlier on Saturday to referee and poke fun at the captains, saying: "Just watching Shearer there, he could barely move... bit like when he played really!"
The day also saw professional boxer Scott Quigg commentating, former England right-back Danny Mills scoring for Team Shearer and Countdown star Rachel Riley slogging out a full 12 hours on the pitch.
Actor Ralf Little partnered with singer Lamar to try to bring Team Savage back into the game in the final hours.
McFly's Danny Jones and Josh Cuthbert from band Union J each did a 12-hour stint overnight.
Hip-hop star Fatman Scoop who was given a red card by Man United's winger Adnan Januzaj for persistent foul play.
American Scoop was not pleased but admitted he got an education in football, saying: "The guy puts a red card on me. I don't know what a red card is. Then everyone tells me to get off!"
Cast members from a variety of British soap operas - Emmerdale, Coronation Street and Hollyoaks - battled it out in game 100, calling themselves the "Northern Allstars".
The action saw celebrities including John Bishop, Hugh Dennis and Angus Deayton take on footballers Danny Mills, Kevin Kilbane and Dion Dublin.
The 57-hour duration of the match was chosen because it is the equivalent of a Premier League club's entire season.
The Premier League is matching all of the public's donations up to a maximum of £500,000.
The money will go towards helping disadvantaged people in the UK and overseas.