Members of the public contacted police after witnessing an incident in East Hermitage Place where a man was punched to his head and body while preventing his rucksack from being stolen.
The victim made off from the area with all of his possessions prior to police arrival. However, the men aged 30 and 28 were apprehended by officers.
Both are scheduled to appear at Edinburgh Sheriff Court on Monday, April 2.
Police are still carrying out enquiries to trace the alleged victim and he is asked to contact police immediately.
Anyone with any information can contact Lothian and Borders Police on 0131 311 3131, or the charity Crimestoppers in confidence and complete anonymity on 0800 555 111.