Farm picked up the charity's business following a five-way pitch, which was handled by the AAR, against TBWA\London, Karmarama, glue London and Lowe London.
The agency will now be briefed with creating a campaign that will try to persuade the over-50s to invest in their hearts by becoming more physically active.
The agency will begin work immediately, and the campaign will launch in April.
Farm, which merged last year with Leith, will only work on this single brief. The BHF does not retain an agency, but instead calls a pitch for each individual campaign.
Betty McBride, the charity's director of policy and communications, said that following research and testing of the pitched ideas, the target audience "universally liked" the work from Farm.
McBride's team believes the strongest ideas emerge in a pitch scenario, where several agencies are played off against each other.
Recent work that has hit the headlines includes 2004's execution by Euro RSCG, which depicted fat oozing out of a cigarette and fat dripping out of an artery.
The most recent work for the charity was created by TBWA\London, and was called "doubt kills". The execution portrayed the effects of having a heart attack by showing a man's chest being restricted by a belt.