Marketing activity promoting the deal will kick off in September to capitalise on increased interest in athletics following this summer's Beijing Olympics.
The tie will support the frozen-food firm's 'It's all good' positioning and marks its first significant shift into sports sponsorship.
A campaign, entitled 'McCain track and field', will be fronted by former Olympic champion Sally Gunnell and aim to support young UK athletes at grass-roots level as well as encourage wider participation in athletics.
The sponsorship will be activated through a series of branded roadshows inviting people to try out different athletic disciplines.
The deal was handled by BMB Live, the sponsorship arm of McCain's ad agency, BMB. UK Athletics' principal sponsor is insurance firm Aviva, whose sponsorship also expires in 2012.