The song won Single of the Year, CMT Video of the Year, and is on "Is It Friday Yet?" which won Album of the Year in the awards show at Rexall Place.
Bamford, along with writing partners Buddy Owens and Ray Stephenson, also won Songwriter of the Year award Saturday for the ballad.
"I lost my brother-in-law two years ago and this song is for him. I'm sure he's lookin' down," Bamford told the audience after accepting the Single of the Year award.
Bamford's brother-in-law Cory Mathies took his own life at age 41 in June 2011.
Bamford, from Lacombe, Alta., has said he thought often of Mathies while writing and recording "Leaning on a Lonesome Song."
"He had a battle with addiction and depression — something that for me that was tough to comprehend because we have such a good life and we don't think of those things," Bamford said later backstage.
He said he has heard from fans who have told him the song helped turned their lives around.
"That song has saved some lives out there," he said.
"It's taken people from addiction to being sober again."
Bamford's lyrics speak of a man who is "borderline crazy" with worry wondering if the love of his life will decide to return to him.
The pain is "like pouring whisky on an open wound" but it's the music, the "leaning on a lonesome song" that keeps him going.
"Let the twin fiddles sing, let the steel guitar twang," sings Bamford.
"It's in that jukebox filling up the room."
The video is shot mainly in black and white, intercutting shots of a boxer working out while pining for the woman he hopes will return. Bamford sings while walking amongst the ruins of a building.
Bamford won Album of the Year in 2010 for "Day Job" and Male Artist of the Year in 2010.
Last year Bamford won for songwriter of the year for "Is It Friday Yet?" a song he wrote with Roger Brown and Byron Hill.
This was his first Single of the Year award and his first CMT Video of the Year award.
Dean Brody won male artist of the year for the second consecutive year.
The 38-year-old Brody was born in B.C. but moved from sea to sea, now living on the South Shore of Nova Scotia.
Brody said it still doesn't seem real.
"A couple of years ago I was still working at the Sherwood Park Wal-Mart," he said in accepting the award.
"This whole thing still feels like I'm on the peripheral. I have so much respect for the artists in this room."
Kira Isabella of Ottawa continued her ascent up the ranks of country music stardom, winning the best female artist award.
Isabella, 19, captured the rising star award in 2012 after her runaway hit "Love Me Like That." Isabella said she's ready for the pressure given her rapid rise to stardom.
"When I was doing my performance (at the awards show) I was very, very nervous, but looking down at my peers, they had the most proud smiles," said Isabella backstage.
"I'm part of their family now, and that's all I ever wanted."
The husband and wife team The Stellas won their first Group of the Year award.
MaryLynne and Brad Stella of Whitby, Ont., credited Johnny Reid with helping them find the sound and encouraging them to record their songs outside the studio where they felt most comfortable.
"We recorded them in the bathroom and he let us do that," Brad said backstage.
"MaryLynne would be like, 'I want to sing' and it is like 3 o'clock in the morning and we're like 'OK' and she goes in the bathroom and lights a candle," he said.
"That's where we recorded all those songs."
Terri Clark won her eighth Fan's Choice award.
The Grande Ole Opry alumnus from Medicine Hat, Alta., first won the award in 1997, followed up by 2001, 2002, 2003, 2004, 2006 and 2007.
She wasn't at the show to receive the award.
Alberta's Bobby Wills won the Rising Star award in a year he was nominated for Single of the Year with the single "Show Some Respect."
"It's been a crazy year. To cap it off with this award is unbelievable," said Wills.
Wills, adopted as a child, was born in Edmonton but grew up in Calgary and got the musical bug after a trip to Australia.
Edmonton singer Corb Lund took home the Roots Artist/Group of the Year Award on Saturday.