A club statement read: “Boro have agreed a deal in principle with West Ham United to sign striker Ashley Fletcher.
“The former Manchester United youth player has left West Ham’s training camp in Germany and is heading to Boro for talks.”
Fletcher made just two league starts for West Ham after signing from Manchester United in 2016.
He appeared 20 times for the Hammers, scoring once, having failed to play for United – although he did have a successful loan spell at Barnsley in 2015-16.
Boro have already broken their transfer record to sign Britt Assombalonga from Nottingham Forest for £14million this summer.
They have also captured goalkeeper Darren Randolph from West Ham, striker Martin Braithwaite from Toulouse while Jonny Howson joined from Norwich.