Officers attended the property in the city’s Oxgangs Crescent in the early hours of Friday.
A 20-year-old man has been arrested in connection with the incident.
Chief Inspector Scott Richardson said: “Officers, including specialist firearms officers, attended an address in Oxgangs Crescent, Edinburgh, in the early hours of Friday, 21 May, following a report of a man in possession of a weapon.
“A 20-year-old man has been arrested in connection with the incident and enquiries are continuing.”