A neighbour alerted police about 8.20am on Thursday after noticing a man carrying a gun walking along a street in Dover Heights, which is dotted with multimillion-dollar clifftop houses.
The men were allegedly involved in a violent struggle after officers chased them by car to Old South Head Road at Bondi, where they were overpowered.
Detective Inspector Adam Solah said two men, aged 20 and 24, were arrested a short time later.
"We know that one of the males were out on the street with a firearm and witnesses called police," he told reporters.
A loaded semi-automatic pistol and a revolver were found in the car used by the men to flee the scene, police said.
Police were alerted to a man carrying a gun on a Sydney street, dotted with clifftop houses. (Mick Tsikas/AAP PHOTOS)
Det Insp Solah was unable to confirm whether Mr Ibrahim or any members of his family may have been the targets of a planned attack when pressed by reporters.
"The reason for them being there will form part of our lines of inquiry and at this stage the reasons for them being there haven't been ascertained," he said.
Detectives were seen at Mr Ibrahim's home on Thursday, but Det Insp Solah said officers had been speaking with everyone living in the area following the incident.
The former Kings Cross nightclub owner, his family and his associates have previously been the targets of violence, including the shooting of Mr Ibrahim's bodyguard in 2017.
All three of his brothers have been shot in various incidents dating back to 2009.
The arrested men were not from the local eastern suburbs area, Det Insp Solah added.
"It appears to be an isolated incident and we don't believe there's any further threats," he said.
Detectives were seen canvassing George Street to collect CCTV footage and speak to residents.
Serious charges were expected to be laid, Det Insp Solah said.