The deal, which will run for three years, follows last month's record-breaking eighth marathon.
Antonia Flockhart, the Edinburgh Marathon Festival's partnership manager, said: "As well as being a world-class sporting event, the Edinburgh Marathon Festival aims to promote community involvement, health and wellbeing, so we see this relationship with Oxfam as a perfect partnership fit for us because there is a real affinity between the types of people who participate in marathons and Oxfam's core supporters."
A record 16,822 runners took to the streets of the Capital last month, participating in the Scottish Half Marathon and the Hairy Haggis Team Relay, as well as the Edinburgh Marathon.
Alicia Donaldson, Oxfam's running events manager, said: "This is an amazing opportunity. To continue our life-changing work, like supplying people with safe drinking water or campaigning for free education for all, we need people to run for us. Being associated with the marathon is the ideal platform to ask people to support Oxfam."