Left-armer Ansari, 23, is the third spinner in the 16-man team alongside Moeen Ali and Adil Rashid.
Moeen could be used as an opening batsman with captain Alistair Cook, although uncapped Alex Hales has also been included, despite failing to impress in the one-day international series against Australia.
There was no place, however, for opener Adam Lyth or Gary Ballance, both deemed to have failed during the Ashes test series against Australia that England won 3-2.
Batsman James Taylor won a test spot after some impressive performances in the one-day international series against the Australians.
“Zafar Ansari’s potential excites us and he will provide strong competition for Adil Rashid and Moeen Ali in the Test squad after enjoying an excellent domestic season with both bat and ball for Surrey,” national selector James Whitaker said in a England and Wales Cricket Board (ECB) statement.
“Alex Hales has scored heavily for Nottinghamshire in first-class cricket this season, has shown he can play match-winning innings for England in white-ball cricket and fully deserves an opportunity to compete for a place at the top of the order in our Test side.”
Ansari, who has a degree in politics and sociology from Cambridge University, played down his chances of breaking into the playing eleven.
“It’s going to be hard,” he told Sky Sports News. “There are a lot of guys there who have been playing well.
“If the opportunity comes, then great, but if not I’m gonna run on with the drinks with as much energy as possible!”
The first test starts on Oct. 13 in Abu Dhabi, followed by matches in Dubai (Oct. 22) and Sharjah (Nov. 1).
A four-match ODI series and three Twenty20 matches follow.
Left-arm spinner Stephen Parry of Lancashire has been recalled to the Twenty20 squad, which also features Sussex paceman Chris Jordan, now fully recovered from the side injury which ruled him out of international contention mid-way through the season.
Ben Stokes has been rested for the limited overs matches.
“Ben has been an outstanding performer for England this summer and this decision reflects a desire to manage his workload across a busy winter period in all three formats of the game,” Whitaker said.
The ECB also announced that former England captain Paul Collingwood and former Sri Lanka skipper Mahela Jayawardene have been appointed to the England management team as consultants.
While Collingwood will work with the limited overs squad in the UAE and during next year’s World Twenty20, Jayawardene will act as the batting consultant to the test squad.
Test squad: Alastair Cook (captain), Moeen Ali, James Anderson, Zafar Ansari, Jonny Bairstow, Ian Bell, Stuart Broad, Jos Buttler, Steven Finn, Alex Hales, Liam Plunkett, Adil Rashid, Joe Root, Ben Stokes, James Taylor, Mark Wood
ODI squad: Eoin Morgan (captain), Moeen Ali, Jonny Bairstow, Sam Billings, Jos Buttler, Steven Finn, Alex Hales, Adil Rashid, Joe Root, Jason Roy, James Taylor, Reece Topley, David Willey, Chris Woakes, Mark Wood
T20 squad: Eoin Morgan (captain), Moeen Ali, Sam Billings, Jos Buttler, Alex Hales, Chris Jordan, Stephen Parry, Adil Rashid, Joe Root, Jason Roy, Reece Topley, James Vince, David Willey, Chris Woakes, Mark Wood