Gary Walsh had just returned to his home on Comiston Road after parking up his bike when the incident happened.
He explained that he was not long inside when, “I heard a fuss and commotion.
"Two guys on their own bike and the cover of mine had been thrown off.
"It was just a matter of seconds, I saw them making off.
"They were interrupted by a lovely neighbour, who shouted at them, ‘what are you doing’ or something like that.”
The helpful neighbour was also able to snap a picture of the alleged thieves as they drove off.
Gary said: “Kindness wins every time” adding that he had brought his motorbikes saviour a bottle of wine to say thanks, adding “she was quite shaken by the incident so it seems an appropriate gesture of thanks!”
A Police Scotland spokesperson said: “Officers were called to reports of an attempted theft of a motorbike on Comiston Road, Edinburgh at around 10.30pm on Tuesday, 21 June, 2022.”
This comes after a spate of anti social behaviour across the city involving youths on off road bikes.
Last week, a local man was assaulted in Roseburn by a group on motorbikes.
The man, who didn’t want to be named, explained “I noticed there were five to eight [of them] in the gang of them all wearing balaclavas or face coverings.
“I tried to pursue them and had a confrontation at a distance with the one who hit me, but they were too quick and were darting in and out of traffic towards Murrayfield.
“An older gent saw us and told us that they had attacked some Italian folk, tourists maybe.
“I also took to Reddit to explain my experience and another person on there claimed they had been struck in the face and had to miss work due to injury to their eye.”
A few days before, a similar incident took place in the Meadows where a group, also on motorbikes and wearing balaclavas, threw ketchup over a bystander.
Police announced that they would increase patrols across specific parts of the city to deal with anti social behaviour.