The incident took place in Cables Wynd at about 23:00 on Friday 26 August.
A 25-year-old man suffered a gunshot wound to his leg and was taken to Edinburgh Royal Infirmary. Police said it was an "isolated incident".
A firearm, which officers believe was the same one used in the incident, was recovered close to Cables Wynd on Sunday.
Det Insp Alan O'Brien said: "Police Scotland treats all reports of incidents involving a firearm with the utmost seriousness.
"Thanks to the co-operation of the local community and extensive policing inquiries, an arrest has now been made.
"I want to reassure the public that our inquiries so far suggest that this was an isolated incident."
The 30-year-old is expected to appear at Edinburgh Sheriff Court.
A 30-year-old man has been charged over the discharge of a firearm in Leith, Edinburgh, last week.