The England selectors also named a 15-man squad for the One-Day series next month.
Opener Hameed, 19, is expected to replace Alex Hales as captain Alastair Cook's opening partner for the two-Test series which begins on October 20.
Surrey captain Batty, 38, who played his last Test against Bangladesh in 2005, is one of four spinners included alongside Surrey's Ansari, Adil Rashid and Moeen Ali.
Batsman Joe Root will be rested for the three One-Day Internationals, which begin in Dhaka on October 7, before joining the Test squad.
England Test squad: Alastair Cook (captain), Moeen Ali, James Anderson, Zafar Ansari, Jonny Bairstow, Gary Ballance, Gareth Batty, Stuart Broad, Jos Buttler, Ben Duckett, Steven Finn, Haseeb Hameed, Adil Rashid, Joe Root, Ben Stokes, Chris Woakes, Mark Wood.
One-Day International squad: Jos Buttler (captain), Moeen Ali, Jonny Bairstow, Jake Ball, Sam Billings, Liam Dawson, Ben Duckett, Liam Plunkett, Adil Rashid, Jason Roy, Ben Stokes, James Vince, David Willey, Chris Woakes, Mark Wood.
This website uses cookies.