Murray had said after losing in Melbourne that he may never play tennis again but announced that he was seeking to make a doubles comeback in March.
He and partner Feliciano Lopez saw off Joe Salisbury and Rajeev Ram in a match tiebreaker after the first two sets were shared 7-6(8), 5-7.
Lopez and Murray had fallen a break down in the first set but with Ram and Salisbury serving for it at 5-4, they were able to get back on level terms before taking it in a tiebreak.
Britain's Salisbury knocks out Murray to reach men's doubles final
Murray himself succumbed to pressure while serving to force another breaker at 5-6 in the second, meaning that a match tiebreak was required to decide the final and Murray was able to serve it out.
"I've enjoyed it, I felt very relaxed at the beginning of the week, then I started getting more nervous as the week continued and my competitive instincts were kicking in," Murray said.
"My hip felt great, there was no pain."
For Lopez, it was his second title of the day, having already beaten Gilles Simon in three sets to take the singles crown.
"It happens maybe once in a lifetime, with how difficult it is to win the singles, I cannot believe I won both," he told BBC Sport.
It was Murray's first doubles title since he triumphed in Tokyo alongside his brother Jamie in October 2011.
Wimbledon men's doubles
Wimbledon witnesses first 12-12 tiebreak
Murray and Lopez into final after beating Kontinen and Peers