The Scottish Courage-owned brand has had previous associations with F1 through its title sponsorship of three championship races, including the British Grand Prix.
Foster's status as official beer will now enable it to use the F1 trademark across all its products and marketing material. The brand will also benefit from hoardings and pouring rights during all Grand Prix weekends.
The F1 season, which starts this weekend, lasts for nine months and covers most of the main beer markets.
The first Chinese Grand Prix took place in Shanghai last year and this year brings the addition of a Turkish race in Istanbul. Formula One races are also held in Japan, Brazil, the US, Bahrain and Malaysia, as well as several in Europe.
The deal will be unveiled at this weekend's Australian Grand Prix in the brand's hometown of Melbourne. Foster's is also race sponsor.
Separately, Diageo's whisky brand Johnnie Walker has been confirmed as a sponsor of the McLaren F1 team in a three-year deal, worth £15m a season.
Johnnie Walker replaces West, which has withdrawn from the sport ahead of a ban on tobacco advertising in F1, which begins in July.
Both Diageo and McLaren are to use the sponsorship deal to promote responsible drinking.
Diageo is planning a £2m TV advertising campaign to support the responsible drinking message.