The agreement could create up to 250 jobs across the UK. The funding will allow Toyota to set up a pilot production line for its Hilux FC model at its plant near Derby.
Research carried out there could eventually pave the way for trucks to be built at the company's Deeside factory in Wales.
Hydrogen-powered vehicles do not use electricity stored in a battery but generates it through a chemical reaction between hydrogen and oxygen.
The government said that hydrogen vehicles were better suited to isolated settings like farms and quarries, where pickup trucks are already commonly used, and the infrastructure for electric vehicle charging is impractical.