The defending champion at SW19 spotted the dog running towards traffic while he was driving to the All England Club yesterday morning.
The 27-year-old wrote on his blog: "There was a danger that I might not make it to practice at all on Sunday morning when I found myself in the middle of a busy road trying to stop the traffic on the way into Wimbledon.
"I saw a dog running loose along the road and stopped to try and help. After a bit of a struggle, I managed to get it in the back seat of my car, rang the number on the tag and eventually got the dog back to its owner, safe and sound. Quite what anybody in the passing cars made of it all, I've no idea!
"Amazingly my two dogs, I didn't realise, walk with that dog quite a lot. So when I met the owner she said, 'we know your dogs'. She was happy I'd picked it up but it had obviously been chasing something because it was absolutely shattered, it was drooling everywhere in the car, panting, but thankfully it was safe."
The Scot, who begins the defence of his title against David Goffin of Belgium later today, owns two border terriers named Maggie May and Rusty.