A judging panel gave the award to Walsh for the one-liner: "I just deleted all the German names off my phone. It's Hans free."
But fellow comic Pete Cunningham said he had been using the joke in his own routine for many years.
TV channel Dave, which sponsors the award, defended its choice of winner.
A spokeswoman said she was "entirely confident" the award had been given to the rightful recipient.
She added: "The jokes for Dave's Joke of the Fringe are submitted by 10 extremely experienced comedy critics from shows performed at the Edinburgh Fringe.
"Each submission is checked and cross-referenced for originality before being put to a public vote."
Cunningham, who has a Fringe show at the Voodoo Rooms, told BBC Scotland that he and Walsh "go back a few years" and are "always going backwards and forwards with comments and puns about each other's stuff".
The pair had a Twitter exchange in April of this year in which Cunningham tweeted the "Hans free" punchline, which he said he had first used as part of a routine by his Frank Sanazi character about seven or eight years ago.
He added: "Frank Sanazi is my most popular character and has a bit of a cult following.
"I was doing a gag seven or eight years ago - some new material. One of the gags is that I pretend that I have an agent called Harvey Goldberg, because being Frank Sanazi - you see what I mean, having a Jewish agent - that's the joke.
"And I say my agent likes me to take the German names off my phone to make it Hans free.
"Darren has used the punchline for that joke."
Cunningham insisted he "wasn't bitter about it", but that it would be nice to be recognised for telling the joke first.
He added: "There's the famous saying that there are only two or three jokes in the world and they are all sort of spun around but I have been using it for quite a while, an extended version of his gag."
He said he had a "little chat" with Walsh about it, and was "happy for him that he won because he's a nice guy and I love his stuff, but there's a small feeling that I had actually done the gag before".
He claimed: "It wasn't one of the best gags in my show anyway. It's quite ironic that the best gag at the Fringe is one of the weakest gags in my show."
A comedian has claimed that he was the first to tell the joke which won Darren Walsh the prize for the funniest gag at this year's Edinburgh Fringe.